Issues around forms and graphics being drawn onto a computer screen, windowing system or device
Questions tagged [drawing]
5923 questions
2
votes
1 answer
wxWidgets: Is there any way to avoid or to speed up wxBitmap::ConvertToImage()?
To get some smooth graphics, I want to draw oversampled by factor 2 and scale down afterwards.
So what I am doing is to draw oversampled on a wxBitmap in a wxMemoryDC, and then scale it down before copying to my dc. The code below works fine, but…
Jakob
2
votes
1 answer
how can I put multiple objects on the same canvas?
i'm creating a web page where you dynamically draw multiple rectangles. I can draw the single object, but once I tried to draw another one, the previous one is gone away. I tried to save the state using save() and restore(), and it seems that I…

user2585578
- 295
- 6
- 18
2
votes
1 answer
how to draw a text on a circle in SWIFT
I have no clue how to start , so I also do not have any code.
My research so far pointed out, that there is no standard functionality and this has to be coded by our self ?
any hint or confirmation ?
Update using CoreTextArcView, which was…

mcfly soft
- 11,289
- 26
- 98
- 202
2
votes
2 answers
XNA - Drawing Quads (and primitives) in right order
I'm fairly new to 3D-stuff in XNA and unfortunately I have encountered a problem I can't find the solution for. (Don't even know what the problem is).
To cut it short: I am drawing quads in my game using:
effect.World = Matrix.Identity *
…

Robert Kaufmann
- 768
- 1
- 9
- 21
2
votes
2 answers
Draw arbitrary convex shape knowing the lengths of its sides
I've got a list of values, which are the lengths of the sides of an arbitrary convex shape (polygon).
How can I draw this shape? What algorithm can help me with this task?
For example, I have a list: 2, 5, 2, 3. The drawing has to look like this:

netgoblin
- 659
- 5
- 11
2
votes
1 answer
How can I overcome lagging when drawing a circle to track the mouse position in CALayer?
I have a layer-backed NSView. When the mouse enters the view, I want to draw a big circle wherever the mouse is. Basically track the mouse position. Unfortunately, the circle is lagging behind the actual mouse position.
I think it has something to…

user965972
- 2,489
- 2
- 23
- 39
2
votes
1 answer
How can I show/hide background drawing on QGraphicsScene or QGraphicsView?
I would like to have certain things drawn on QGraphicsScene, but not be QGraphicsItem (it would interfere with the processing of the QGraphicsItem collection).
Example: a scene bounding rectangle, a grid
I am overriding the drawBackground(QPainter…

Thalia
- 13,637
- 22
- 96
- 190
2
votes
2 answers
draw Cross at application start C#
I am trying to draw a cross inside of a Windows Forms App.
I can do it using two lines. I have tested it using a Button.
Now I do not know how I can draw it automatically when opening the application without pressing a button.
thanks for ur help :D

darude_cod3r
- 91
- 3
- 11
2
votes
1 answer
Formula to draw pyramid of circles
I'm trying to create a pyramid of circles to my game, looking similar to this :
alt text http://img266.imageshack.us/img266/3094/lab1213c.jpg
But I can't make it print properly. Constantly I'm getting really strange spirals but nothing close to…

terence6
- 151
- 2
- 2
- 11
2
votes
1 answer
Get coordinates of a drawing point from Chart Values in TextBoxes?
In the designer I have two TextBoxes.
And also a Chart control.
I want that when I type in the first textBox the number 120 and in the second one type the number 1 it will draw a point on the chart in 120,1 but I mean 120 and 1 as axis x and axis y…

Daniel Hamutel
- 643
- 1
- 13
- 30
2
votes
1 answer
How to draw text of multiple sizes aligned on line with TextRenderer?
I have an array of classes that contains some text and a font. I want to draw all the text aligned on line independently on font size. I thought I can just subtract font height from Y-positiontion of the line and draw the text on the new position…

Pavl
- 83
- 1
- 8
2
votes
4 answers
Drawing N-width lines?
Given a series of points, how could I calculate the vector for that line 5 pixels away? Ex:
Given:
\
\
\
How could I find the vector for
\ \
\ \
\ \
The ones on the right.
I'm trying to figure out how programs like Flash…

jmasterx
- 52,639
- 96
- 311
- 557
2
votes
1 answer
Rendering path with Canvas.drawPath() in ICS with hardware acceleration
On ICS device, I tried the following code to draw two rectangles.
Path p1 = new Path();
p1.moveTo(0, 0);
p1.lineTo(0, 100);
p1.lineTo(100, 100);
p1.lineTo(100, 0);
p1.close;
Path p2 = new Path();
Matrix scaling = new Matrix();
scaling.preScale(2,…

user690421
- 422
- 1
- 5
- 15
2
votes
1 answer
How refresh a DrawingArea in PyGTK?
I have an interface created with Glade. It contains a DrawingArea and buttons.
I tried to create a Thread to refresh every X time my Canva. After a few seconds, I get error messages like:
"X Window Server 0.0", "Fatal Error IO 11"
Here is my code…

Lialon
- 1,459
- 1
- 9
- 6
2
votes
2 answers
WPF: Convert VisualBrush to Drawing?
I have a VisualBrush and need this VisualBrush as a Drawing. Anyone knows how this can be done? Thanks for any hint!

stefan.at.kotlin
- 15,347
- 38
- 147
- 270