Issues around forms and graphics being drawn onto a computer screen, windowing system or device
Questions tagged [drawing]
5923 questions
19
votes
3 answers
Prevent accidental select/drag highlight
I have a drawing application using html5 canvas. When the user is drawing and pen slips out of the canvas area, chrome highlights html elements on the page in light blue or yellow.
This is disruptive to the drawing experience. Is there a way to…

Homan
- 25,618
- 22
- 70
- 107
19
votes
3 answers
How to turn off the anti-aliasing in WPF shapes?
I draw a rectangle using:
but there is anti-aliasing applied to it. Is there a way to turn this off? I want it to be sharp and clear.

Joan Venge
- 315,713
- 212
- 479
- 689
19
votes
5 answers
What are some good algorithms for drawing lines between graph nodes?
What I'm specifically grappling with is not just the layout of a graph, but when a user selects a graph node and starts to drag it around the screen area, the line has to constantly be redrawn to reflect what it would look like if the user were to…

ApplePieIsGood
- 3,731
- 6
- 35
- 51
19
votes
2 answers
Draw smooth circle in iOS sprite kit
I try to draw a single circle in my iOS SpriteKit project but the edges of the circle are not smooth. I would like to have a nicely drawn circle as I would draw it with Photoshop (anti-aliasing). I found several similar questions but the my problem…

xpepermint
- 35,055
- 30
- 109
- 163
19
votes
12 answers
Some tips for more effective white-boarding?
I am occasionally called upon impromptu to white-board (non-virtually) data flows, architecture diagrams etc., for both a technical and non-technical audience. Unfortunately my drawing skills (and print legibility) are terrible.
How can I become…

D'Arcy Rittich
- 167,292
- 40
- 290
- 283
19
votes
5 answers
What is the difference between System.Drawing.Image and System.Drawing.Bitmap?
I am confused what's the different between System.Drawing.Image and System.Drawing.Bitmap
Can someone explain the major difference between those two types ?
And Why to use System.Drawing.Bitmap instead of System.Drawing.Image ?

Kas
- 3,747
- 5
- 29
- 56
18
votes
4 answers
UIView: how to do non-destructive drawing?
My original question:
I'm creating a simple drawing
application and need to be able to
draw over existing, previously drawn content in my drawRect.
What is the proper way to draw on top of existing content
without entirely replacing it? …

George Armhold
- 30,824
- 50
- 153
- 232
18
votes
4 answers
Drawing text in .NET
I'm doing some tests about drawing text in .Net and I had the following results.
The first string is a native Label with the FlatStyle set to System
The second string is drawn using Graphics.DrawString() method
The last one is drawn using…

Daniel Peñalba
- 30,507
- 32
- 137
- 219
18
votes
4 answers
CoreGraphics Quartz drawing shadow on transparent alpha path
Searching the web for about 4 hours not getting an answer so:
How to draw a shadow on a path which has transparency?
- (void)drawRect:(CGRect)rect
{
CGContextRef c = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(c, 2);
…
user207616
18
votes
8 answers
How to know if a line intersects a rectangle
I have checked out this question, but the answer is very large for me:
How to know if a line intersects a plane in C#? - Basic 2D geometry
Is there any .NET method to know if a line defined by two points intersects a rectangle?
public bool…

Daniel Peñalba
- 30,507
- 32
- 137
- 219
18
votes
1 answer
Google Drawing API
I'm looking for a way to create Google Drawings via API: create/draw shapes/export etc. Is there a Google API for this?
All I find are references to Google Maps drawing and a forum post which talks about the Drive API. Besides that, I can't find…

setcookie
- 579
- 1
- 6
- 12
18
votes
2 answers
HTML5 Canvas eraser tool without overdraw white color
I have canvas. I have paint tools pencil and eraser. How i can erase drawings without overwrite(overdraw) with white color.
this my code eraser over drawing with white color:
http://jsfiddle.net/66z12xb0/
I have in back end save image after…

Asker
- 291
- 1
- 3
- 11
18
votes
2 answers
How to draw and scale a bitmap on a canvas using bicubic interpolation in Android?
I want to draw a bitmap on a canvas with bigger size than it is. I can use canvas.drawBitmap(bitmap, null, destRect, null); but that gives a poor quality, as the result is pixelated, if the source image is sightly smaller than the destination…
user301895
17
votes
2 answers
Drawing part of a Bézier curve by reusing a basic Bézier-curve-function?
Assuming I'm using some graphic API which allows me to draw
bezier curves by specifying the 4 necessary points:
start, end, two control points.
Can I reuse this function to draw x percent of the 'original' curve
(by adjusting the control points and…

ivan_ivanovich_ivanoff
- 19,113
- 27
- 81
- 100
17
votes
6 answers
How to draw a dashed line over an object?
I am drawing a line on a control on my Windows form like this:
// Get Graphics object from chart
Graphics graph = e.ChartGraphics.Graphics;
PointF point1 = PointF.Empty;
PointF point2 =…

Alex Gordon
- 57,446
- 287
- 670
- 1,062