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 2004

Filter by week: 1 2 3 4 5

image Clone problem when using LockBits
Posted by Norvin Laudon at 3/31/2004 11:54:10 AM
Hi, I am using LockBits to perform some pixel processing on some Bitmap objects. A Bitmap arrives as an argument to an event, where the processing takes place. The processing must be done on a _copy_ of that image, not on the image itself, so I create a new Bitmap using the .Clone() method o...more >>


Server Side Printing
Posted by Clive Godden at 3/30/2004 2:50:44 PM
Hi there Does anyone have vb.net code snippets on how to print a document to a PDF printer driver installed on the webserver with the filename the print file needs to be saved as passed in as a parameter Thankx ...more >>

Re: problem with path.Widen
Posted by Nancy at 3/30/2004 10:43:08 AM
Hi Bob, I assume I didn't hear a response because I didn't supply the correct info. I hope the following is what you are looking for. It's from the Call Stack window when I have a breakpoint set for the pth.Widen(nPen) stmt. With this set, I can't get to the out of memory error cause everytime...more >>

AdjustableArrowCap
Posted by bobino NO[at]SPAM hotmail.com at 3/30/2004 6:44:11 AM
The AdjustableArrowCap doesn't seem to be affected with the scaling of graphical elements. Even though everything else is getting bigger or smaller, the AdjustableArrowCap object stays the same (or doesn't follow the rest of the graphical objects). Anyone can help me on this? I thought of ...more >>

Intersection point of two lines
Posted by Wally Highsmith at 3/29/2004 7:44:53 PM
Anyone have an algorithm (c# or java source code) for finding the point of intersection between 2 lines? thanks. ...more >>

please help, losing sanity!! System.Drawing.Imaging......quality
Posted by Kjell Brandes at 3/29/2004 2:22:00 PM
Trying to convert images (bmp, jpg, gif....) to JPG. I've gotten so far as to open image saving it to jpg, but I want to set encoding quality. I can't find a good example in VB.NET. Could someone please help me with this?? regards Kjell Brandes ...more >>

dark
Posted by Thomas Bock at 3/28/2004 8:17:02 PM
Hi NG How can I make a Color darker or reduce the darknes? Thomas Bock ...more >>

Changing Horizontal Font Spacing/Leading
Posted by rproemer NO[at]SPAM yahoo.com at 3/28/2004 3:38:45 PM
Hi, I'm trying to figure out a way to change the default spacing between letters in a string. It seems like it should be easy enough to do, but I can't find anything on it. Right now I'm using: Dim Font1 As Font = New Font("Arial", 12, FontStyle.Regular) g.DrawString("TESTING 123", Font1,...more >>



Can't figure out how to restrict cursor movement
Posted by Michael Will de Laforcade at 3/27/2004 4:44:54 PM
I am witing my own imaging control which among other things handles events. Part of the functionality is drawing a wire frame. I got all that figured out... here's the problem. I need a way to keep the mouse inside my control while moving it with a mouse button pressed. ie while wire frami...more >>

Image processing with .NET
Posted by Steve at 3/26/2004 8:06:17 AM
I am currently using .NET to build a prototype of an application for use in medical imaging. Medical imaging has some unique needs such as the ability to process images in realtime. The basic functionality that I am working on right now is mapping the 12 bits of grayscale that are used in a medical ...more >>

Form Resizing
Posted by Oren at 3/26/2004 3:51:07 AM
Hi there I already asked this question but I'll try in another formulation and I couldn't find any suggestions here about it Well, I have a Windows Application in C# with Textbox (Anchor Bottom), Splitter (Anchor Bottom) and RichTextBox (Anchor Fill) I do have a problem while Resizing the Form ...more >>

Can you draw directly to the screen?
Posted by scottfoley NO[at]SPAM bigfoot.com at 3/25/2004 8:23:54 AM
Is it possible to draw over an existing image without redisplaying the entire image each time? I am using a PictureBox Form, but could change that if needed. Right now I read in what is currently there, add to it, and then redisplay it like this: Bitmap objBitmap = new Bitmap(pictureBox1.Ima...more >>

windows application
Posted by Oren at 3/25/2004 2:31:05 AM
Hi All I have a windows application in C#, Sizable Form, with these controls by order on screen from the top 1. System.Windows.Forms.GroupBox (contain all the othe controls) -> Anchor: Top, Bottom, Left, Righ 2. System.Windows.Forms.RichTextBox -> Dock: Fil 3. System.Windows.Forms.Splitte...more >>

group box/shortcut drawing bug?
Posted by chaue NO[at]SPAM devix.com at 3/24/2004 10:14:13 AM
Hey all - I'm developing a solution with visual studio and i've been having issues with the drawing... sometimes. In particular, the lines around a group box and the underlined letters for shortcuts on buttons don't always draw correctly. Sometimes part of the line shows, sometimes none o...more >>

problem drawing in user control
Posted by wocev NO[at]SPAM hotmail.com at 3/24/2004 5:11:08 AM
Hi, I want to write some text in my User Control. This is the code I use: Private Sub uControlTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.SetStyle(ControlStyles.ResizeRedraw, True) Dim g As System.Drawing.Graphics g ...more >>

Graphics transformations performance
Posted by Yizhaq Shmaayahoo at 3/24/2004 2:36:07 AM
Can anyone comment on the performance of the graphics object transformations? I am writing a control that presents graph curves. It presents a few hundred points. One option to draw them is to use the Graphics object transormations.This might present performance issues, because the pixel values are...more >>

CCITT4 Problem
Posted by Jeff Davis at 3/23/2004 6:38:36 PM
I would like to submit a TIFF image I generate using the .Net framework to the FaxDocument.Body method in the Windows Faxing API (not part of .Net), but I'm getting errors. What I am trying to do is splice multiple TIFF files together (each one possibly a multi-page TIFF) to create a single multi...more >>

Rounding errors
Posted by sk at 3/23/2004 3:51:05 PM
Results of exclude, intersect and complement on Regions always seem to be offset by +0.5 This happens for simplest shapes like rectangles (RectangleF) as well. Is this a known issue? Regards sk...more >>

TransparencyKey+Drawimage (2)
Posted by Armin Zingler at 3/23/2004 1:33:54 PM
[modified repost with additions] Hi, I set the TransparencyKey of a Form = Color.Green. Why doesn't the following code create a transparent client area? Private Sub Form1_Paint( _ ByVal sender As Object, _ ByVal e As System.Windows.Forms.PaintEventArgs) _ Handles MyBase.Paint ...more >>

Resize Picture and change resolution
Posted by Chris Davoli at 3/23/2004 12:11:09 PM
Is it possible to resize a picture ie; bmp, tiff, gif and change the resolutiuon of the picture to make its size smaller in bytes and width and height smaller? ...more >>

Render Webpage as Bitmap in GDI+
Posted by Naeem S at 3/22/2004 11:16:05 PM
Is it possible to render a webpage as a bitmap image in GDI+?...more >>

Drawing Pie segment in ellipse
Posted by Timmy at 3/22/2004 10:47:47 PM
I am using GDI+ to create an Ellipse based Pie chart, and I am trying to calculate the start/sweep angle for each segment, so that each segment is evenly sized. Currently I have 12 segments so I simply do 360 / 12, which works for for a circle based pie chart but not for an ellipse based pie. ...more >>

Need help with Antialias/Smoothing
Posted by Michael Will de Laforcade at 3/22/2004 6:41:14 PM
I have a app that needs to display scanned tiff images. They are 200x200 dpi b/w images. Displaying them in the "Forms.PictureBox" is not a problem, but I'm having issues turning on the anit aliasing feature. I need the images to display "visually clean / pleasing" despite the fact that they...more >>

problem with path.Widen
Posted by Nancy at 3/22/2004 4:04:06 PM
BlankHi, I can't find the original posting by Bill Menees with a response from Bob Powell (may have expired) so can't hook this thread to it. Anyway, my situation is slightly different but I think I adapted Bob's suggestion ok. Code is below. I'm not getting "out of memory" anymore however a r...more >>

Printing a picture...
Posted by Laurent Lequenne at 3/22/2004 1:21:53 PM
Hello there, I experimenting some problems with printer resolutions. I create an Image of a certain size. And I would like to print it ! Result is a huge image that is converted from pixel to something like Centimeters of inches. Visually it's OK ! But I have some large images and I would l...more >>

Shapes
Posted by Ashok at 3/22/2004 5:06:07 AM
Hi All Is there any support in the .Net to support shapes like Lines, rectangles, Etc as we have a control in VB 6.0? These shapes should behave excatly like how we have in VB. Any kind of help is appreciated Thanks & regards Ashok....more >>

creating a metafile in a specified resolution
Posted by Alexander Stojakovic at 3/22/2004 4:08:00 AM
I would like to produce exact output of in memory created metafiles, fo instance for a printer that is not currently available. Imagine you have no printer installed and want to produce a yardstick (or meter) for a 300 dpi printer as a metafile.... best regards Sascha ...more >>

Is it possible to resize a transparent GIF?
Posted by Mike Bridge at 3/19/2004 10:56:41 PM
I have a method, taken from the web somewhere, for resizing a jpeg which works well, using the System.Drawing.Graphics class. But Graphics won't accept PixelFormats that are indexed---in my case, Gif images---so I have to convert these to a non-indexed PixelFormat. The problem is that when I co...more >>

Extremely slow drawing speed
Posted by Pete at 3/19/2004 6:13:27 PM
I'm trying to draw a 50x50 grid of 32x32 images with the following code: ImageList tiles = ...; Bitmap buf = new Bitmap(Width, Height); Graphics g = Graphics.FromImage(buf); g.Clear(Color.Black); Point start = ...; Point end = ...; // ends up to be ~50x50 for(int x = start.X; x < end.X+1; +...more >>

drawing problems...
Posted by Senne Vaeyens at 3/19/2004 4:18:20 PM
Hi, I'm writing an app that will show a scrolling transparent graph and I'm ancountering some problems, explained in the following code: (a VS project explaining the problem(s) can be downloaded at http://www.icat.be/problem.zip ) The code is executed on a timer.tick event: // Draw Using...more >>

Drawing child controls in back buffer?
Posted by florian at 3/19/2004 4:08:58 PM
Hello, I have drawing/flickering issues with a .net app which uses nested controls. Here's the setup: My main form has a background image, and several custom (composite) controls as children. Each child has to draw a picture, add a textbox and a button. My problem is the following: W...more >>

Measure height of a string (with newline characters)
Posted by Tom J at 3/19/2004 2:06:08 PM
I have a string that has \n or new line characters in it...how do I accurately get the height of the string? MeasureString only seems to return the height of one line.... ...more >>

Understanding WM_NCCALCSIZE
Posted by J.Marsch at 3/19/2004 11:06:57 AM
Hello all: I am creating a control that will have a custom border in its non-client area. This is very similar to Bob Powell's recent article in Well Formed magazine. I think that I have everything working, but there is a point that I do not understand. In my case, my control is a container...more >>

Rezise Image using Aspect Ratio
Posted by Brian K. Williams at 3/19/2004 9:22:09 AM
If I have an image 400 width by 500 height. I can figure out my aspect ratio like this: float Ratio=((float)nOrigWidth)/((float)nOrigHeight); How can I use this value if I want to change the width to 200? Thanks in advance. Brian K. Williams ...more >>

Games in C#
Posted by Mark G at 3/19/2004 1:56:05 AM
Hi Can anyone tell which game(s) is developed with C# Some shooter game or vehicle simulation I just need some "evidence" of how DirectX 9 (with C#) works Thanks...more >>

Focus Rectangle
Posted by Evan at 3/18/2004 11:06:49 AM
ok, most applications have a focus rectangle or selection rectangle when selecting a portion of an image. Anyone have an idea how I can replicate this effect on a picture box? ...more >>

about convert emf to emf+
Posted by shan chen at 3/17/2004 11:31:21 PM
How to convert emf format to emf+ format?...more >>

Convert an EnhancedMetafile to Bitmap
Posted by wernze NO[at]SPAM gmx.net at 3/17/2004 3:07:32 PM
Hi, I try to convert an EnhancedMetafile from the Clipboard to a Bitmap, but I'm not really able to do so. The following code does not work... it crashed with an Exception saying that the conversion in Line 2 what is wrong?! By the way: I try to get an Excel diagram into a Bitmap file. Is t...more >>

problem with Gdi+ and mouse handleing
Posted by raj at 3/17/2004 10:36:09 AM
I am making a program in which there are multiple balls on same drawing surface. They are made by multiple instences of a class each drawing on the same usercontrol's drawing surface. I have added a motion capacity in them and methods to select them(multiple selct is also possible) but when i drag t...more >>

Fixing brushes to objects
Posted by tristan_sehgal NO[at]SPAM yahoo.co.uk at 3/17/2004 4:01:59 AM
Hi, I have polygons drawn on a screen which use hatched brushes. I want the patterns to remain fixed to the objects rather than the screen so that when I pan around the screen the pattern stays *exactly* the same within the polygon. This is particulary important because my application builds ...more >>

2D geometry library ?
Posted by Gawelek at 3/17/2004 12:40:00 AM
It means not for image processing but for 2D transformation. For example: Union, intersect of two polygons, checking if point is inside polygon etc. I can say: just GraphicsPath with union, intersect etc. Thanks in advance -- Gawel ------------------------------- Pierwszy ³yk z pucharu na...more >>

Drawing during MouseMove. Can I use this.CreateGraphics?
Posted by Rudi Larno at 3/16/2004 6:53:41 PM
Hi, I read on several forums and blogs that the use of this.CreateGraphics is bad for drawing actual shapes. It is said that only the Graphics object taken from the OnPaint EventArgs is the right one to use. So my question is, can I store a reference to this Graphics object in my control f...more >>

Fixed Rectangle in Scroll Control
Posted by Ivan Aponte at 3/16/2004 11:59:13 AM
Hello: I want to draw a rectangle with some text on the top of a Panel but I want it to stay fixed while the control scrolls vertically but to move when it scrolls horizontally (much like a fixed header). I did this code but did not achieve the desired effect. protected override void O...more >>

find baseline to draw a wavy underline in RichTextBox
Posted by Paul at 3/16/2004 9:56:05 AM
I'm trying to draw a wavy underline under certain words in a RichTextBox. To do so, first, on application.idle, I parse all lines in the text box looking for the key word and save the words index and length to a collection. Next, I capture the WM_PAINT message to draw the wavy underline under all...more >>

Asp.net with visio
Posted by Gilles T. at 3/15/2004 3:14:40 PM
Hi, I need to create a drawing visio with asp.net. I installed Visio 2002 and Visio SDK 2002. In my vb code I have: Imports System.Collections Imports System.Runtime.InteropServices Imports Microsoft.Office.Interop.Visio But I have this error: Description: An error occurred during th...more >>

Trying to create a GIF with a transparent background
Posted by Joe Gass at 3/15/2004 2:18:52 PM
Trying to create a GIF with a transparent background when rendered in IE Here's the code I have, I end up with a black background Dim drawString As String = "Sample Text" Dim drawFont As New Font("Arial", 12) Dim drawBrush As New SolidBrush(Color.Black) Dim x As Single = 2.0F Dim y...more >>

Invalid parameter used. Bitmap bm = new Bitmap(responseStream);
Posted by mbokhari NO[at]SPAM hotmail.com at 3/15/2004 1:58:30 PM
I get an "invalid parameter used" error when I execute this script. What I'm attempting is to capture a web page to a jpg format. WebRequest request = WebRequest.Create("http://www.yahoo.com"); WebResponse response = request.GetResponse(); Stream responseStream = response.GetResponseStream(...more >>

comparing images...
Posted by David at 3/14/2004 8:41:39 PM
Hello... i've two, 100% identical images in two fales, in fact the only thing what differs is their name... i've loaded them to two diffrent pictureboxes (C#)... is there a way of compering between those two pictureboxes "Image" property, if the picture is same? or any other way to "compare" it...more >>

Need Custom PrinterResolution Help
Posted by Andrew Schmidt at 3/14/2004 7:39:19 AM
I am developing a C# application that print documents using the PrintDocument component. Actual printing works well. I am now adapting the code to fax the result instead. I took the approach of developing the custom PrintController that outputs a multi-page tiff file which I then fax with Micros...more >>

System.InvalidCastException for Bitmap Constructor -- Please help!!!!
Posted by Me at 3/14/2004 1:27:10 AM
Hello, I am getting a System.InvalidCastException from this line of code : myBitmap = New Bitmap("myfile.bmp", True). I am working on a Win2K, .NET 2003, VB.NET environment. I am developing for the .NET Compact Framework using an iPAQ 4350. In order to isoloate the problem, I always run m...more >>


DevelopmentNow Blog