Questions tagged [drawing]

Issues around forms and graphics being drawn onto a computer screen, windowing system or device

5923 questions
17
votes
2 answers

How to make invisible nodes occupy space in graphviz?

I want to plot a binary tree using graphviz, and it is important that the left child of a node appear to the left (duh) of the right child. If there is no left child, I want an empty space on the left, to make it visually clear that the right child…
Fernando
  • 595
  • 1
  • 3
  • 12
17
votes
7 answers

C++ Graphic Drawing Library

Does anyone know what's the best graphic drawing library for C++, I want a lib that can draw basic shapes and can make image editing, gradients and vector or 3D would be great to. The windows drawing functions are complicated and are not very…
Andrei
  • 4,289
  • 4
  • 25
  • 23
17
votes
18 answers

What do you use to make programming flowcharts, diagrams, etc?

I've always just used OpenOffice Draw and it just occurred to me that there has to be something better out there. So what do you use? Do you like it? Bonus points for free things and for web apps.
Mike Crittenden
  • 5,779
  • 6
  • 47
  • 74
16
votes
5 answers

How do you load a bitmap file into a BitmapData object?

In Flash, the BitmapData object can be used to store bitmaps in RAM, you can later draw them to a MovieClip using the beginBitmapFill() method. How do you load an external bitmap file (.jpg) into a BitmapData object? Even AS3 code would be helpful.
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
16
votes
2 answers

C# - Resize image canvas (keeping original pixel dimensions of source image)

My goal is to take an image file and increase the dimensions to the next power of two while preserving the pixels as they are (aka not scaling the source image). So basically the end result would be the original image, plus additional white space…
Game_Overture
  • 1,578
  • 3
  • 22
  • 34
16
votes
4 answers

Clear Canvas Rect (but keep background)

I'm trying to animate a circle and just moving it horizontally which works fine. However while the circle is moving, I have to do a clearRect over that circle so that it redraws it self in the horizontal direction. When I do a clearRect it also…
fes
  • 2,465
  • 11
  • 40
  • 56
16
votes
13 answers

Application for sketching ideas on a computer

I've always wanted to sketch all ideas I come up with in the computer instead of on paper, but everyone knows that sketching with good 'ol fashioned pen and paper beats the crap out of trying to do it with a mouse (or even worse, a touch pad). So I…
thr
  • 19,160
  • 23
  • 93
  • 130
16
votes
4 answers

Algorithm for drawing an anti-aliased circle?

What's a good algorithm for drawing anti-aliased circles? (Filled and not filled.)
John Scamps
16
votes
7 answers

Sankey diagram in javascript

I want to draw a Sankey diagram using Javascript. Can anyone provide some direction regarding the algorithms or libraries that are available for this?
321zeno
  • 1,264
  • 1
  • 12
  • 24
16
votes
2 answers

Linear gradient across SVG line

I am wondering how to make linearGradient across (from top to bottom) the line, as opposed to the example below where the gradient goes along (from left to right) the line.
Aleksandr Ianevski
  • 1,894
  • 1
  • 18
  • 22
16
votes
0 answers

How to map Frame coordinates to Overlay in vision

I'm feeling that this Question is already solved many times, but I cannot figure it out. I was basically following this little Tutorial about mobile vision and completed it. After that I tried to detect Objects myself starting with a ColorBlob and…
Rafael T
  • 15,401
  • 15
  • 83
  • 144
16
votes
5 answers

Create a colored bubble/circle programmatically in ObjectiveC and Cocoa

Can anyone guide me in the correct way to build a colored bubble/circle programmatically? I can't use images as I need it to be able to be any color depending on user interaction. My thought was maybe to make a white circle image and then overlay a…
kdbdallas
  • 4,513
  • 10
  • 38
  • 53
16
votes
2 answers

Draw arrow on line algorithm

Does anyone have an algorithm for drawing an arrow in the middle of a given line. I have searched for google but haven't found any good implementation. P.S. I really don't mind the language, but it would be great if it was Java, since it is the…
nunos
  • 20,479
  • 50
  • 119
  • 154
16
votes
2 answers

Curvilinear perspective: Convert 3D to 2D

I'm looking for the mathematical expression converting a 3D coordinate (x0,y0,z0) to a 2D (x1,y1) coordinate in a curvilinear perspective of radius R where the values of x1 and y1 are the angles of views {-90° .. +90°} of the original…
Pierre
  • 34,472
  • 31
  • 113
  • 192
15
votes
4 answers

Canvas' drawLine and drawRect not including end position?

To my surprise I've just discovered that drawLine and drawRect don't include the ending position, i.e.: canvas.drawLine(100, 100, 100, 100, paint); or RectF rect = new RectF(100, 100, 100, 100); canvas.drawRect(rect, paint); won't draw…
javaxian
  • 1,815
  • 1
  • 21
  • 26