Questions tagged [drawing2d]

110 questions
1
vote
1 answer

Line form corner to corner

I got a little problem, I think I made a mistake. Can you help me please? Question: I want to use specifix integers for drawing line and filling rectangle. I tried to do it, but line, using same coordinates as rectangle, is not from corner to…
moraprex
  • 103
  • 9
1
vote
1 answer

How to erase drawing in fabric.js?

There is a canvas with an object. Need to drawing on object and also need eraser function. See the canvas screenshot: canvas where able drawing function I see fabric.js hasn't erasing functionality. Is there any way to erase drawing with a erase…
Aram Vardanyan
  • 111
  • 1
  • 10
1
vote
0 answers

How to draw a chord of ellipse with specific center point and the points located at the start and end of chord in c#

I am using c# and the library of System.Drawing.Drawing2D to draw some regular geometries. However, I cannot draw a chord of ellipse with specific center point and the points located at the start and end of chord.
1
vote
2 answers

Lines and shapes drawn at incorrect angles

I have a c# program where I need to draw some simple 2D objects on the canvas. One of these involves drawing a rectangle and lines where I know the start point, the length and I have to calculate the end position. So I have the following code; …
jason.kaisersmith
  • 8,712
  • 3
  • 29
  • 51
1
vote
2 answers

How to export svg from pixijs

Is it possible to render svg from pixie composition? I'm working on a project where I'll draw generative graphics and then I'll have to have them in some vector format because this will go to print. I would be happy to get svg or some other vector…
onoxo
  • 153
  • 1
  • 9
1
vote
1 answer

Conversion System.Windows.Media.Geometry --> System.Drawing.Region

I have an unmanaged API, which uses a System.Drawing.Region as argument. The problem is, that I have a System.Windows.Media.Geometry, which I need to convert into the Region-class. I wonder how I should convert this type... Should I look for corner…
unknown6656
  • 2,765
  • 2
  • 36
  • 52
1
vote
0 answers

How to draw an arrow with big cap using c#?

I want to draw an arrow using C# I can write the following: protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); Pen p = new Pen(Color.Blue, 1); p.StartCap = System.Drawing.Drawing2D.LineCap.DiamondAnchor; p.EndCap =…
Jad Chahine
  • 6,849
  • 8
  • 37
  • 59
1
vote
3 answers

C# GDI Drawing2D help

What GDI methods can I use to draw the blue shape shown in the image below? The center must be transparent.
Kevin
  • 3,574
  • 10
  • 38
  • 43
1
vote
2 answers

How can I override the canvas in my View?

I am using Android 2.1 and Eclipse. I have defined a LinearLayout with two components that have dimensions: 250 x 250. LinearLayout ll = new LinearLayout(this); ll.setOrientation(LinearLayout.VERTICAL); LinearLayout.LayoutParams llp = new…
user274610
  • 509
  • 9
  • 18
1
vote
2 answers

Graphics.DrawHalfCirle & Graphics.DrawPartialCircle

I'm trying to draw half and partial circles (all BLACK lines) on a bitmap. My INTENDED result looks like this: My CURRENT result looks like this: I've tried so many different alternatives but it nevers looks right. using (var b = new…
SF Developer
  • 5,244
  • 14
  • 60
  • 106
1
vote
1 answer

Custom control - first draws OK, second doesn't

I found some code somewhere for a custom groupbox, drawn with rounded corners, a gradient background and a drop shadow. I thought it looked pretty good, so I adjusted it to do the same with a label control. The bizarre thing is that when I drop…
ainwood
  • 992
  • 7
  • 17
1
vote
1 answer

CGContextRef and even-odd fill rule

I need to paint a series of path in a CGContext as a block. These path are drawn by the user so I can not determine their direction. I use the following code snippet to draw the path: CGContextSaveGState(context); UIBezierPath *fillPath = […
reza23
  • 3,079
  • 2
  • 27
  • 42
1
vote
1 answer

Proper Drawing2D class for NET CF?

As I recently found out Drawing2D class of NET CF is missing most of it's functionality. Is there a way to expand it with for example "LinearGradientBrush"?
Kristina
  • 15,859
  • 29
  • 111
  • 181
1
vote
1 answer

Draw Path with zoom and darg

'm developing an application in which I'm pasting images, doing drawing and painting on canvas. This app can also Scale up/down the canvas or drag it to different location. My problem is: I can't get the correct canvas coordinates after scaling or…
strike
  • 1,031
  • 8
  • 24
1
vote
1 answer

Trying to draw two digits and equal distance from the centre

I want it to look symmetrical, but I can't work out why this doesn't work. Font scoreFont = new Font("Impact", Font.PLAIN, 72); g.setFont(scoreFont); FontMetrics scoreFontMetrics = g.getFontMetrics(); g.drawString("" + playerOneScore,…
DreamsOfHummus
  • 735
  • 2
  • 7
  • 18