Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
all groups > dotnet drawing api > april 2007

SVG in IE ?
Posted by Oriane at 4/30/2007 3:46:52 PM
Hi there, what woul you recommend to display and allow to modify SVG document on IE and ASP.NET ? Thanks a lot oriane ...more >>


Cheating the Paint Event ?
Posted by Bill Woodruff at 4/29/2007 10:02:00 PM
I really hate writing Paint Events ! (it showed ?) One strategy I explored to avoid writing a Paint Event in the case of a control with a partially transparent background placed over a second control (where, as we all know too well, only the Form background, not the second control backgroun...more >>

Save-for-Web from PhotoShop CS2 as 24 bit PNG is same as .NET 32bppPargb ?
Posted by Bill Woodruff at 4/28/2007 12:00:00 AM
Curious if you save a PhotoShop document ... using the Save for Web option .... as a 24 bit png file with transparency enabled, and then assign the png file as the Image of a PictureBox control if the underlying bitmap is in 32 bit per pixel ARGB as Bob Powell emphasizes is the most desireabl...more >>

Unable to clone an image
Posted by Steven Garrad at 4/27/2007 11:37:17 AM
Hi There, I need a little help. I have a class uses the PictureBox as a base. In this I want to store the current image twice. So I can restore the image when needed. Right now I create another Image object and when the user hits an apply button it saves the current image into the second ...more >>

how to prevent artifacts that appear when dragging objects?
Posted by SharpCoderMP at 4/25/2007 1:12:35 PM
hi, i've created a canvas like surface on which user can place some objects named frames. this frames can be resized, moved and filled with text or images. i have a problem with artifacts that appear on a drawing surface when user quickly moves or scales these frames. i can't afford invalidat...more >>

why .Net Matrix use float, but not double
Posted by zade at 4/24/2007 2:54:57 AM
..Net Matrix class use float to store data, and Graphics use it to map points from logical to device. My Geometry data is double , and when I use Graphics to draw them, I have to translate. The effect is not good as well when the data is too big or too small. So I have to define my own Matrix cl...more >>

Measure the height of wrapped text
Posted by Samuel at 4/22/2007 4:37:55 PM
I would like to measure the height of wrapped text (of specified font type and size etc). I know of the GetHeight method but how can I use it for a number of lines even if the number of lines is known, I suspect that multiplying the number of lines by the font height will not return the cor...more >>

imprecise Graphics.RotateTransform
Posted by thenext1 at 4/20/2007 12:12:03 PM
I have an image representing a clock's minute hand and which I need to draw in the 12 positions. After fiddling a bit, i noticed that there's a strange offset from the hand in one position (i.e. 3 PM) and the opposite (9 PM). It seems that the RotateTransform function i'm using doesn't work co...more >>



Image caching and graphics resources...
Posted by rlrcstr NO[at]SPAM newsgroups.nospam at 4/18/2007 7:22:03 PM
I've got a winForm that has a good number of custom controls with custom = graphics that are stored as resources in the project.=20 Recently, I updated all of the graphics with a new look. Added all the = new images into the resource file and deleted all the old images. But whenever the form ...more >>

How to change the size of the canvas?
Posted by active at 4/17/2007 4:23:43 PM
I have an image that is basically the canvas that the user draws on. He may also be making changes to the Graphics object that is used to draw on the canvas. Then he wants to make the canvas bigger and continue drawing. I know how to create the bigger Image and draw the old picture on it and ...more >>

tiff image from byte array
Posted by Duane at 4/17/2007 4:07:49 PM
I'm having problems getting the page count of a tiff image from a multi page tiff that was saved to a byte array and then loaded into a bitmap object using image.FromStream. When the following code is ran against a tiff file containing 2 pages the first line written to the console will state: ...more >>

Graphics objects --- passing the object vs the handle
Posted by Jeff at 4/17/2007 1:20:41 PM
I have designed a set of classes which all accept a graphics object and then render lines, rectanges, text, etc to that object. There is a "parent" class which controls the instantiation of each class and also calls the render method for each class, passing the form's graphic object. This pare...more >>

How to create a new graphics object with the same properties as an old graphics object
Posted by active at 4/17/2007 1:07:05 PM
I just posted this in VB group and then thought this NG might be more appropriate. I have an image and a graphics object created (FromImage) from that image. I need to create a new image and create a new graphics object from the new image. I want the new graphics object have all the same...more >>

Transparency problems
Posted by CH at 4/17/2007 8:12:02 AM
Hy, I have a form with transparent BackColor (MyForm.TransparencyKey=MyForm.BackColor) and the OnPaint method draws a rectangle with a GradientBrush the gradient is from Color.Black to Color.Transparent. The result seems to be a gradient from Color.Black to SystemColors.Control instead of ...more >>

optimization fr my app needed -it paints all .NET colors on a form
Posted by giddy at 4/16/2007 1:15:05 PM
Hi , I've written this little app in C# 2.0 under .NET 2.0. It enums all colours(or brushes acutally) availible in .NET via reflection. Then paints them (very elegantly i must add) on the form. It figures how many color boxes will fit onto the client area and then adjusts the AutoScrollPos....more >>

Image.RotateFlip alters resolution
Posted by svendl NO[at]SPAM gmail.com at 4/16/2007 4:56:30 AM
Hi all! I've been trying to figure out this one for a while - to no avail. For some reason, when I load an image, and apply the RotateFlip method the original resolution is altered. Don't really know if this is expected behaviour, but it seems odd to me. Following snippet should produces ...more >>

RotateTransform
Posted by trullock NO[at]SPAM hotmail.com at 4/16/2007 3:58:45 AM
Hi, Ive got an Image object that im using as a canvas. Im using Graphics.Draw() and Graphics.DrawString() to place images and text onto the canvas. I've got everything working apart from rotation. I need to be able to rotate my text and images about their respective centres. Now in the exam...more >>

Preview TTF Fonts
Posted by Kris Morrison at 4/13/2007 12:00:00 AM
Hi can anyone help me i am trying to write a vb.net program that can preview a font file from a folder as a list and gives you the option to install the font? Thanks Kris Morrison...more >>

Make pixels outside curve transparent
Posted by Ben Amada at 4/12/2007 11:15:36 AM
Hi, I'm trying to take an image and make the pixels on the right side transparent with a curve effect. Then save the final picture as a GIF or PNG. I put together an example (using Photoshop) demonstrating the effect I'm after (please see link below). I'm of course looking for a way to d...more >>

Newbie cannot even draw straight lines...
Posted by Christian Stapfer at 4/11/2007 1:22:07 PM
I try to give a user-control the appearance of a piece of checkered notepaper, like this: private void Paper_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Pen pen = new Pen(gridColor); for (int y = 0; y < Height; y += gridSpacing) ...more >>

question about lineargradientbrush and colorblend
Posted by t f at 4/11/2007 8:58:14 AM
hi a quick question about colorblends and lineargradientbrushes... if i do the following: LinearGradientBrush lgb1 = new LinearGradientBrush(somerectangle, Color.White, Color.White, LinearGradientMode.Vertical); ColorBlend cb1 = new ColorBlend(4); cb1.Colors[0] = Color.White; cb1.Col...more >>

Implementing Transparency on Non-client Area of a Control
Posted by mayanc at 4/9/2007 1:59:16 AM
Hi, I'm trying for a while to implement transparency on the non-client area of a custom control. Currently, I'm using this code for the non-client area (on NCPAINT): IntPtr hRgn = (IntPtr)m.WParam; NativeMethods.RECT windowRect = new NativeMethods.RECT(); if (Na...more >>

.NET 2.0: BufferedGraphicsContext trows exception when reaching 1.7Gb RAM ...
Posted by Kristijan Marin at 4/6/2007 6:47:47 PM
Hi, I read almost the whole internet about BufferedGraphicsContext exception beeing thrown with description : BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress. And i didn't find any workaround for that ..... and I'm not even using any do...more >>

Family Tree Diagram
Posted by Swami at 4/5/2007 5:18:03 PM
Any suggestions on how to draw a family tree in ASP .NET? I have a table called Users in my DB that stores all the relationships. Here are relevant fields: UserName Gender ChildFamilyID (the familyID in which the user is a child) SpouseFamilyID (the familyID in which the user is a spo...more >>

WindowFromDC
Posted by MLM450 NO[at]SPAM hotmail.com at 4/4/2007 12:50:38 PM
Is there an equivelant for WindowFromDC in C#? I tried using pinvoke to call WindowFromDC, but I only get null back all the time. Maybe because the window was created with GDI+? Thanks, Mike ...more >>

GDI+ Performance for basic lines and fills
Posted by Brian Schwartz at 4/3/2007 2:35:38 PM
Hello, I have some painting code in a VB6 control (a grid) that performs pretty well--about 30ms for a full paint. When I convert just a beginning part of the control's painting to .NET it crawls--about 40ms for the code below, and this is a mere skeleton. The full code takes about 200ms, c...more >>

Math, Pixels, and GDI+
Posted by Chris Szabo at 4/3/2007 2:12:00 PM
Good afternoon everyone. I'm hoping that someone can help me out with this problem. It's strait forward, but somehow I can't seem to get my head around it. Consider two points on a bitmap. Using those two points, it is easy to determine the equation of a line that intersects the two poin...more >>

Graphics Help TranslateTransform and RotateTransform
Posted by standish22 NO[at]SPAM hotmail.com at 4/3/2007 8:45:40 AM
Hey, I'm confused! I have a document that I want to print to a printer. I'm using inches as my units. I got it working w/ Pixels, but my boss told me I have to use Inches instead. My question is how do you determine what the values need to be to pass to Graphics.TranslateTransform(dx,dy)...more >>

Printer DC
Posted by MLM450 NO[at]SPAM hotmail.com at 4/2/2007 5:56:04 AM
I have conditional logic based on if I am drawing to a printer. In C#, how can I tell if a device context is for a printer? Thanks, Mike ...more >>


DevelopmentNow Blog