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…
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
t1txn
  • 1
0
votes
0 answers

Zooming to point in PictureBox

I have PictureBox which is inside Panel. Panel has set property AutoScroll == true, PictureBox has Sizemode == Zoom. How to simply implement zoom to point in this code? public partial class frmMain : Form { string imageFilename =…
Jodynek
  • 103
  • 2
  • 10
0
votes
1 answer

How to scratch reveal an image with Javascript canvas element

I created a canvas element where I can draw paths. There, I draw transparent paths and I "scratch" reveal the foreground. It works on both mobile and desktop.
jlanssie
  • 97
  • 10
0
votes
1 answer

WPF binding different Shapes to a DataTemplate in an ItemsControl

I'd like to bind different System.Windows.Shapes.Shape to a DataTemplate in an ItemsControl. I have the followng ItemsControl drawing shapes on a Canvas based on an array with positions and shape informations:
Beorne
  • 189
  • 2
  • 17
0
votes
0 answers

How to draw empty rectangle on canvas using mouse in angular 9

I am trying to implement the logic for drawing a rectangle on the canvas image. So basically first I am drawing image on the canvas. I want to provide the functionality of drawing a rectangle on that canvas image using a mouse. mdEvent(e) { …
0
votes
1 answer

Save the Path2D as a .PNG or .JPEG from .to_planar() function of Trimesh Module in Python

My main aim is to get the Drawing views of a STL file. I have tried the SolidWorks Method of converting a STL file to SLDPRT and then take the drawing views, but the drawing views in that case contains a lot of noise and is not accurate. SO, I am…
AdCal
  • 19
  • 1