drawing

Slow screen drawing in .Net C# winforms application

I have a very large C# .net 2.0 winforms application which has some drawing issues. When going into different forms you can see controls being drawn and even the title bar of the form being resized and then disappearing. The base form that all other forms inherit from has the following code in its constructor. Including setting DoubleB...

how to display IBitmapImage on CDC

What is the best way to display IBitmapImage on a device context. I am using Windows CE 6.0. void CImaginingTestView::OnDraw(CDC* pDC) { CImaginingTestDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); IBitmapImage* pBitmapImage = pDoc->GetBitmapImage(); if (pBitmapImage) { // how to draw my bitmap on a pDC ?? ...

Blackberry - how to resize image?

I wanted to know if we can resize an image. Suppose if we want to draw an image of 200x200 actual size with a size of 100 x 100 size on our blackberry screen. Thanks ...

Vector Graphics in C# WinForms - should I interoperate with WPF?

I have a video camera that I'm interfacing with a C# app. The camera actually comes with a .NET WinForms control. It supports drawing on it with GDI+ functions. When I zoom in, I need <1 pixel accuracy i.e. I want to draw a circle with a radius of less than two pixels. How can I draw vector graphics in WinForms? Is my best bet to over...

Drawing Vector Graphics Faster

In my application I want to draw polygons using Windows Create Graphics method and later edit the polygon by allowing the user to select the points of the polygon and allowing to re-position them. I use moue move event to get the new position of the point to get the new coordinates of the point being moved and use Paint event to re-draw...

C# ImageButton Picture Resolution

I'm trying to make a simple picture thumbnail application. I've searched the web and have found fairly complicated thumbnail apps, to simple ones. I have a good one working, If I could get the ImageButton Resolution looking good. Currently, everything works fine, but the resoultion of the buttons is horrible (i've tried various width/...

Replace an Image in an existing Multiple Page Tiff using .Net

Using .Net how do I replace the first page of a multiple page tiff file with a new image. Preferable without create a new file. ...

C# GDI Draw Points onto canvas using an offset?

I have an array of Point variables. When drawn using Graphics.Drawline, they create the expected image. My problem is that 0,0 is actually the center of the image (not the top left of my canvas as expected. My X and Y coordinates in the Points can contain negative numbers. When I try to draw this to my Image, of course I get 1/4 of the...

C# GDI Invert Graphics flipped on the X axis

I am drawing a series of Points using the Graphics class. I am reading from a Point array. For whatever reason the rendered image is upside down (flipped on the X axis). Is there a simple way to tell the Graphics class to draw "upside down" ? Many thanks. ...

C#/.NET: Creating SPECIFIC Dynamic Visuals - House Plan w/ Objects (FOLLOW-UP)

Yesterday, I asked a question about how to dynamically render something in .NET: specifically, I asked about how to create a white "canvas" for "drawing"/rendering upon, what framework to use, etc. However, many of the answers suggested for me to ask a more specific answer, so right now, I have come up with a completely hypothetical (and...

Drawing incrementally in a UIView (iPhone)

As far as I have understood so far, every time I draw something in the drawRect: of a UIView, the whole context is erased and then redrawn. So I have to do something like this to draw a series of dots: Method A: drawing everything on every call - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext();...

rotate shape java2d without losing its origin

protected void paintComponent(Graphics g) { Graphics2D gr = (Graphics2D) g.create(); // draw Original image super.paintComponent(gr); // draw 45 degree rotated instance int aci=-45; gr.transform(AffineTransform.getRotateInstance(Math.toRadians(aci))); super.paintComponent(gr); //translate rotated instanc...

.NET GDI+: Drawing lines with rounded corners

Given an array of points, it is easy to draw a line based on these, e.g. using the GraphicsPath class. For instance, the following array of points... [0]: (0,0) [1]: (100,0) [2]: (0,100) [3]: (100,100) ...describes a line that resembles a Z. But here comes the challenge; I need to draw rounded corners with a radius of e.g. 10 pixels...

Graphics.DrawImage Doesn't Always Paint The Whole Bitmap?

I have run into a strange problem when using Graphics.DrawImage. When using e.Graphics.DrawImage(Image, Point) in OnPaint to paint a bitmap 'buffer' on the control, it appears that parts of the image are omitted. The buffer is populated in a helper method which draws directly onto the Bitmap using a Graphics constructed from it. Wh...

Optimizing map drawing

Hello, I have problem optimizing drawing Google-like map. It works OK for hundreds of points, but when it comes to larger amounts like thousands it gets fuzzy and slow. Also unzoomed it looks weird. I'd like to know how to optimize drawing algorithm to draw fewer places so it looks like unzooming on Google Maps. However I also draw lin...

Erasing in a WPF program

How can I make a MS Paint clone in WPF? I use Canvas and Shapes, but I don't know how to implement erasing. Should I use different controls, image control for example, or other drawing technology? ...

Drawing 30fps chart in Windows Forms

I'd like to draw a high-framerate (30fps+) graph/chart in a Windows Forms app. How? Windows Forms gets TERRIBLE frame rates drawing a clear-background drawing over a window. (I come from the land of GNU, so I apologize if this is obvious.) ...

What is a good 2D graphics framework, for a drawing application?

I am trying to build a raster drawing application using C# and so far I have not been able to locate any versatile light weight 2D graphics frameworks, or guides. I was hoping a few of you would be able to give me a good head start because currently my choices are using GDI+ or WPF and that is about it :(... Basically I need something...

Blackberry app, how to add an image on top of another image file?

Hello all, I'm trying to develop a small map-like application for blackberry. I need to know how can I position a small image onto another much larger image. The larger image is like a map, I'll need to use the small the image to pin point a specific position on the map. So the smaller image should overlay on top of the larger image....

draw circle in Visual C#

HI I have this code that draw a Rectangle ( Im trying to remake the MS Paint ) case "Rectangle": if (tempDraw != null) { tempDraw = (Bitmap)snapshot.Clone(); Graphics g = Graphics.FromImage(tempDraw); Pen myPen = new Pen(foreColor, lineWidth); ...