Questions tagged [drawing]

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

5923 questions
2
votes
1 answer

How to draw a directed graph with labels on edges using quickgraph and graph# libraries?

I'm trying to draw a directed graph with labels on edges. I'm using graph# (graphsharp) and quickgraph, and I saw an explanation in the forums about how to add labels (it is not supported by the library), but cannot manage to implement myself. If…
Uri
  • 25,622
  • 10
  • 45
  • 72
2
votes
1 answer

android- animate text on canvas

I am working with android, trying to animate some text (make it bigger and smaller over time) and I have the following issue. I cant animate the text using the following: int textSize =…
Daniel Benedykt
  • 6,496
  • 12
  • 51
  • 73
2
votes
2 answers

Primitive thickness - DX10

i recently stepped into primitive rendering in directX10. I need that because i want to convert my ingame chat from directx9 to 10 due my huge performance lag being forced by the games weak dx9 support. The lines are being rendered fine on the…
Frank
  • 31
  • 5
2
votes
1 answer

Filling color on image with python

Lets say I have some image that just have some shapes on white background with knowing some x,y point I want to fill it with by replacing white inside the shape (if x,y is inside the shape) Basically like image editors do it with paint bucket…
Djangonaut
  • 5,511
  • 7
  • 40
  • 53
2
votes
0 answers

NSTextField not drawing correctly in custom NSView

I have a custom NSView and I place three NSTextFields into the view programmatically (axes labels for a graph, basically): var axesTextFields : Array = [NSTextField(),NSTextField(),NSTextField()] func addTextFields() { …
Chris Gregg
  • 2,376
  • 16
  • 30
2
votes
3 answers

Drawing in javascript with divs

In my quest to learn javascript (which seems to be my latest source of questions for SO these days) i've found this API for drawing http://www.c-point.com/javascript_vector_draw.htm Meanwhile I've been making some experiments with graphics, which…
fmsf
  • 36,317
  • 49
  • 147
  • 195
2
votes
1 answer

Drawable object where I can store points for faster paint?

I'm designing a custom view which is an X/Y Plot. It's a moving graph that scrolls to the left with time and new Y values are continuously coming in at 10 per second. I've been able to make it work with an array of integers where the array index is…
Brad Hein
  • 10,997
  • 12
  • 51
  • 74
2
votes
0 answers

Android drawing / colouring app

I am making an android colouring app which uses the draw feature. I have it so that there are multiple colours that the user can choose from and they can select a colour and draw however when they select a new colour it changes all previously drawn…
anzeme
  • 19
  • 1
2
votes
2 answers

Java Code - Solitaire

I've created a solitaire game in Java. My question is: How can I fill objects (hearts, spades, diamonds, club) on every card with black or red color? Here is the code I have now: // draw the card public void draw (Graphics g, int x, int y) { …
Boris P
  • 86
  • 2
  • 10
2
votes
1 answer

The proper way to save/restore OpenGL ES state

I know that to save/restore matrix state you use standard push/pop operations. I haven't been able to find a decent convention for saving/restoring state such as when using glLineWidth() or glColor4ub(). It seems not really necessary as long as you…
djdrzzy
  • 603
  • 4
  • 17
2
votes
1 answer

create polygon filled up with dots

Am using the below code to create polygon. i just want to fill this polygon surface with black dots, how i can do that, then i want to convert this polygon to bitmap or in memory stream, how to do this?? // Create a blue and a black Brush …
Spen D
  • 4,225
  • 9
  • 39
  • 47
2
votes
2 answers

What is the right way of creating circle animation?

I just saw this image and it's interesting to me, how to create such type of animation in Swift: So, I have many gray teeth in circle and when I set the angle, for example 45degree it will fill these gray teeth into blue within 0..45 degree. You…
John Doe
  • 511
  • 1
  • 6
  • 13
2
votes
1 answer

Implementing brush thickness variation in HTML5 canvas (example want to emulate inside)

I would like to be pointed in the right direction in terms of algorithm in the demo below here http://sta.sh/muro/. Also the canvas tools it is using - i.e. is it drawing lines or drawing many arcs, etc Specifically I want to emulate the brush…
eirikrl
  • 438
  • 1
  • 5
  • 17
2
votes
1 answer

BufferedImage.setRGB() not working

I have a BufferedImage that is being drawn onto a JPanel. What I'm trying to do is set the pixels of the BufferedImage by: for (int yy = 0; yy < 18; yy++) { for (int xx = 0; xx < 24; xx++) { image.setRGB(xx * 32, yy * 32, 32, 32, pixels,…
kneedhelp
  • 555
  • 4
  • 18
2
votes
2 answers

Using FillPath to create a polygon with holes

I have the following code: using (var gp = new GraphicsPath()) { var outer = new PointF[outerpoly.Count]; for (int i = 0; i < outerpoly.Count; i++) { outer[i] = new PointF(((int)(scale * outerpoly[i].X - xmin)), (int)(scale *…
Thijser
  • 2,625
  • 1
  • 36
  • 71