I just started on the .net compact framework. I want to draw a Sudoku field on the screen. So I put down a PictureBox and defined a method for the Paint event:
private void pictureBoxPlayfield_Paint(object sender, PaintEventArgs e)
{
// use e.Graphics to draw the grid, numbers and cursor
}
This works, but you can see as the grid i...
I have two windows, each with a round NSView:
------------------ ------------
|X-+ Oscillator | |X-+ Mixer |
|----------------| |----------|
| | | |
| O | | O |
| | | |
| | | |
------------------ ------------
Bo...
I'm trying to create a pyramid of circles to my game, looking similar to this :
But I can't make it print properly. Constantly I'm getting really strange spirals but nothing close to this. Can anyone give me some tip on proper formula ? My window is 600x600, base of pyramid is 8 .
fields = new Field[BASE*(BASE/2)+4];
int line...
I have the need to draw shapes in XAML that are always relative to the container window/canvas size. For example, I need a window to show a 3x3 grid on it, where the grid always splits the window into 3 equal parts. Can I create lines that are bound to 1/3 the width of the grid?
thank you
...
How can I create a rounded rectangle with a dashed line? I've seen several routines that draw their own straight lines, but nothing for rounded rectangles.
...
I need help on creating an application like Visio in Silverlight, of course a much more simpler one. Just dragging and dropping shapes and connecting them is enough at this time. Can someone direct me to some resources about this? Algorithms / implementations don't need to be in C# / Silverlight. It may be enough to start with the logic ...
is there some online web app which would let me make a vector drawing, and give me the choice to write some text and send it through gmail ?
for the magic to be complete, the web app would save my drawing as png (or whatever) and attach it to the sent email...
i guess i would have to give the webapp my gmail account info so it can sen...
I have a 2D list of vectors (say 20x20 / 400 points) and I am drawing these points on a screen like so:
for row in grid:
for point in row:
pygame.draw.circle(window, white, (particle.x, particle.y), 2, 0)
pygame.display.flip() #redraw the screen
This works perfectly, however it's much slower then I expected.
I want to...
hello all
i am facing problem in drawing dynamically in a picture box. i works very good when the drawing objects are few but as the drawing objects increases the response time of my GUI is getting worse and worse, my GUI works very well up to 90 drawing objects but i have to support more than 1000 so this technique didn't work for me.
...
Hi,
I'm resizing jpeg 1200x900 ,556kb by method:
public static Image ResizeImage(Image imgToResize, int height) //height=400
{
int destWidth;
int destHeight;
int sourceWidth = imgToResize.Width;
int sourceHeight = imgToResize.Height;
float nPercent = 0;
float nPercentH = 0;
nPercentH = ((float)height / ...
In my application I have a NSWindow with some drawing which is quickly changing (i.e. animation or video). Also I have another application, emulated via X11, which created GtkWindow.
How can I copy all the drawings from the first Cocoa window to the second Gtk one in real-time?
Or, let me better divide the question on two parts:
How...
I need to draw a polyline into a DrawingVisual. I'm using StreamGeometry for performance reasons. The problem I have is that I can't figure out how to enable anti-aliasing. I can't find any method or property on StreamGeometry or on DrawingContext for anti-aliasing control.
The code below is in IronPython, but it shouldn't matter:
geom...
If i have an array of coordinates for a path(Such as in a paint program), what is the best way to render the entire path with SDL?
I looked at setting pixels individually, but from what i've seen that's a bad idea.
I also thought about drawing all the coordinates as SDL_Rect's, but rendering a large list of rect's each frame sounds sl...
Hi every body,
I am trying to write a new application.it has a source treeview,and a button in another stack panel.
i would like to draw a line between selected treeview item and the button i have mentioned.
i don't know how could i do it.
it would be garteful if anyone can help me.
...
Context
I am drawing to a canvas, this is updated regularly and it flashes.
Logically thinking I assumed this is because my redraw method clears the Canvas then draws one element at a time to the canvas. so my idea was to write to a Timage then set the picture to the Timage.
Information
here is my code
procedure Tmainwindow.Button3...
Hi there, 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 *
Matrix.CreateRotationX(Rotation.X) *
Matrix.CreateRotatio...
I've got an application window in which I'm adding the WS_THICKFRAME style and I have removed the WS_CAPTION style. When the window maximizes, I want to hide the WS_THICKFRAME, but retain the Aero-Snap feature, so I have altered my handler for WS_NCCALCSIZE to return an inflated rect with respect to the size of the window borders.
That ...
In Direct2D they recommend drawing similar things together, to avoid unnecessary GPU state changes. They also do some drawing operation reordering behind the scene just for that.
I have to draw a lot of rectangles which can have one of two colors. I'm thinking of doing the drawing in two passes, one for the rectangles with the first col...
There is no gdiplus.dll in my WinCE device, Is there any way I can get gdi+ functionality in .NET CF? I'm particularly interested in anti aliased drawing of polygons. (that's all I want).
...
I am trying to draw a shape's reflection using Cocoa. I have already applied an NSAffineTransform and redrawn the shape successfully, but now I can't figure out how to draw an alpha mask over it. I'm using an NSCompositeDestinationOut operation, but it's giving me an unwanted result:
I'm not exactly sure how to fix this - I need to make...