Questions tagged [drawing2d]
110 questions
0
votes
3 answers
Draw a Bucket with multiple liquids
I need to draw a bucket and fill it with two different liquid colours (yellow and red).
I have got so far in a hard coded version but I need to be able to specify the % of the bucket filled, so for instance 50% yellow then 10% red.
I have never done…

Neo
- 2,305
- 4
- 36
- 70
0
votes
1 answer
How to Draw an Arc using just 2 known points without DrawPie or DrawArc
I've question to ask you guys...
Let's say I have 2 lines as shown below:
What I want is to draw an arc that complete the shape as shown below:
Notes:
I know the start and end points of the lines and the angle between them.
The length of the…

unnamed
- 840
- 9
- 26
- 38
0
votes
1 answer
Using java, how can I make a method taking in a BufferedImage, rotate it, and return a BufferedImage ( with correct width / height )
I have been looking up a lot of examples, every time I try, my image becomes offset, and also not rotated by the degree I am looking for.
I have a class which extends JPanel, and draws an image. This JPanel is then put into my JFrame. I need to have…

ThePerson
- 3,048
- 8
- 43
- 69
0
votes
0 answers
some error in get distance function from point to line
I'm doing MFC project now to study and given concept of this is "to reinvent the wheel".
So, I should not use CRect or ArcTo and etcs. Make every basic functions by my own.
I made a getDIstance function, and I got an error that detected the shape on…

b4lleEr
- 1
- 1
0
votes
0 answers
The elements of a drawing on a single page is exported as a multi-page PDF in Inkscape Version 1.3
I drew a few elements (actually, lines) in inkscape and added some 'text' elements in-between. When the did 'Save a copy' as PDF (with text in separate file by choosing 'Omit Text in PDF and create LaTeX file' option from File > Save a Copy...…
0
votes
0 answers
Drawing rectangles with React & Canvas multiple rectangles issue
This is hook file :
import { useEffect, useRef, useState } from "react";
export function useOnDraw(onDraw) {
const canvasRef = useRef(null);
const isDrawingRef = useRef(false);
const prevPointRef = useRef(null);
const…

Tech Nech
- 1
- 1
0
votes
0 answers
Locating ballooned items on technical drawing
I am trying to see if there is a way to use python to locate ballooned items on a pdf technical drawing. One can manually look through all of the pages of a drawing, but it would be nice if a script could be used to find them and then provide a…

Carl Gaufin
- 1
- 1
0
votes
1 answer
vb.NET - How to Get boundary of GraphicsPath without including Bezier handle locations
I'm trying to do a boundary around a GraphicsPath for easy group sizing. This works fine but when I convert one of the points to a bezier it includes the location of the Bezier handles within the boundary making the selection rectangle much larger…

CNC3D
- 11
- 3
0
votes
0 answers
Need to draw 0 in a for loop, but it keeps getting skipped
I'm trying to make a drawing panel that draws little circles with numbers in it, going from 0 to 9. However, the for loop, for one reason or another, keeps skipping 0. I've tried setting i to -1, but that doesn't change anything. Conversely when I…
0
votes
0 answers
can't see rect on javascript canvas
I am trying to draw a rect to the screen but it doesn't show up here is the code used
index.html