Groups | Blog | Home


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 > march 2005 > threads for march 8 - 14, 2005

Filter by week: 1 2 3 4 5

DrawLine Limitation?
Posted by Yos Nugroho via .NET 247 at 3/14/2005 10:27:07 PM
Hi, Recently I stummbled on an unexpected, weird behavior of Graphics.DrawLine method. This is an example code : Bitmap bmp = new Bitmap(100, 100); Graphics g = Graphics.FromImage(bmp); Point p1 = new Point(int.MaxValue, 0); Point p2 = new Point(0, 0); g.DrawLine(Pens.Black, p1, p2); g....more >>


bitmap.RawFormat problem
Posted by Trapulo at 3/14/2005 1:14:02 PM
I've a byte array containing a gif. I need a test to be sure the image is a gif and not a jpg or other format. I try to check this via bitmap.rawformat property, but I cannot. This is my code: Dim stream As New System.IO.MemoryStream(bytesImage) Dim image As New System.Drawing.Bitmap(Draw...more >>

Save GDI+ drawing from picturebox control
Posted by Sam at 3/14/2005 1:08:47 AM
Hi guys I'm trying to save my drawing (lines and rectangles)on a picture box as an bmp file but I got an error which complains something "Object reference not set to an instance of an object" How do I initiate an instance of my object outside my paint event? Could anyone give me some sugges...more >>

Copy one Bitmap to another in C#
Posted by David at 3/13/2005 9:45:28 PM
Well, I found that by creating a Bitmap from a file using the constructor it places a lock on the file. How do I get around this as mentioned in http://support.microsoft.com/?id=814675? I have an indexed image source. I couldn't find any solution to do this. It's very obscure. I would...more >>

Can I use an Array of Points to define an Image "Hostspot"
Posted by Troy Jerkins at 3/12/2005 2:48:53 PM
Platform VS.NET 2003, ASP.NET, VB.NET I have quite a few (159) array of points in my code behind that define and draw county boundries of a State Map using the drawpolygon method. I have 2 arrays listed below to provide an example. My idea is to have the regions dynamically change color based on...more >>

Trim
Posted by Páll Ólafsson at 3/12/2005 11:37:48 AM
Hi again.. And how can I Trim a rect object? Regards Palli ...more >>

Should I store Graphics object ?
Posted by Sanjay at 3/11/2005 6:04:01 PM
hi, We are currently porting our project from VB6 to VB .NET. Earlier we used to make scale transformations on objects like pictureBox , forms etc.Now Such transformations are made on the graphics object of the form/pictureBox. Should It be better if make a graphics object from my picture...more >>

Trouble with repainting
Posted by Tomaz Koritnik at 3/11/2005 10:35:39 AM
Hi I made a simple app in VS.NET 2003 and C# to draw bitmap on form inside OnPaint event. I added timer to repaint the form every 10ms by calling this.Invalidate within timer event. When I run the app and move the cursor around the screen (This only happens if I move the cursor), when form ...more >>



The fastest way to draw lines?
Posted by ultimA at 3/11/2005 9:35:03 AM
What is the fastest way to draw lines? I need to draw a maximum of 100000 simple lines on the screen, my computer does this in 0.6sec but that is far too slow. I tried to mess around with the properties of the graphics object, but it turned out that the defualt ones are the fastest ones. Im d...more >>

Create custom control inherting button
Posted by Bhagvan Chougule via .NET 247 at 3/10/2005 11:26:53 PM
I want to write custom control inheriting button control. In my custom control I want to display the text on button after the image set for button event though the imagealign and textalign are set to middleleft. Any help please. Thanks -------------------------------- From: Bhagvan Chougule --...more >>

Open, edit, and save in-place?
Posted by DJM at 3/10/2005 4:56:20 PM
I am adding watermark text to an image uploaded to my web site, following the walkthrough here: http://www.codeproject.com/useritems/TransparentImageWatermark.asp (except I'm doing this in C#). The sequence of events is this: Image image = Image.FromFile(filePath); //Loads the file into me...more >>

memory graphics
Posted by Phil Da Lick! at 3/10/2005 1:23:58 PM
Hello, In my old win32 app I used to use SetWindowExt/SetViewportExt/SetWindowOrg/SetViewportOrg to do some translations. I notice that dotnet's Graphics object transformations aren't that sophisticated so I have a workaround which would work if I could create a "memory" Graphics context ...more >>

Moving a rectangle within an image while Xor'ing
Posted by Olaf Rabbachin at 3/10/2005 11:25:04 AM
Hi folks, I have an image that is drawn into a panel. The printable area of that image will be represented by a rubberband (-rectangle) which is drawn on top of that image. To further clarify that, I'm Xor'ing the regions of both the image and the rubberband so that the area outside of the rub...more >>

Printing on custom paper size
Posted by dusty at 3/10/2005 7:07:04 AM
Hi I cant manage to print on a custom sized paper. I set up the margins and paper size using: PrintDocument printDoc = new PrintDocument(); printDoc.DefaultPageSettings.PaperSize = new PrinterSize("Test", 413, 682); printDoc.DefaultPageSettings.Margins = new Margins(50,50,50,50); .... In...more >>

Size and position of a scaled image (after Transform)?
Posted by Olaf Rabbachin at 3/9/2005 8:40:33 PM
Hi folks, using Transform (see i.e. www.bobpowell.net/bestfit.htm) I'm drawing a scaled version of an image onto a panel (s.b. for my code). Any pointers as to how to get the size and position as it will be drawn after the transform? Using something like this (with the code at the botto...more >>

Draw a path with a Pen which has a width of 2?
Posted by Özden Irmak at 3/9/2005 3:43:26 PM
Hi, I created a custom control and drawing it's border depending on the selection of BorderType... The border can also have different shapes such as Round, Circle, Rectangle, etc... When I draw this border, I first create a GraphicsPath outlining the border and than drawing the path u...more >>

How to obtain System Fonts folder
Posted by Adry at 3/8/2005 4:02:18 PM
Hi, how can I to retrieve the system fonts folder ? or, better, from fontname how can I retrieve the font file complete path ? For example, having a "Tahoma" fontname, I would like to get the complete path of the file installed on the system ("c:\windows\fonts\tahoma.ttf"). Thanks ...more >>

Paint and what can i do?
Posted by Jutta Terhechte at 3/8/2005 3:17:05 PM
Hi NG, i have some problems with the paint methode: 1. When i move the mouse fast, the paint methode (DrawRectanlge), will not paint fine. I can see a lot of fragments of the old frame. What's wrong? 2. Can i paint an 'active' Frame like ants? 3. What must i do, to paint the rest of the grap...more >>

JPEG 2000 compressor
Posted by Mitch Hilger at 3/8/2005 12:33:03 PM
Hi, I will have access in a few days to a JPEG 2000 compression HARDWARE device which is not quite ready for retail sale. However, I have 3 queries for those of you interested in the capability. 1) Would you be interested in a WEB based portal service which provides click charge fee for JP...more >>


DevelopmentNow Blog