|
| | |||||||
| Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications. |
| | LinkBack | Thread Tools |
| |||
| Anti-Aliasing Problem with Ink Renderer on Memory DC - Again... Hi, I'm trying to render Ink (collected somewhere else) onto my custom control. I have run across the problem that Renderer.Draw( Graphics, Strokes ) fails to support anti-aliasing and transparency settings of strokes. This is not the case however, when drawing on the Graphics object that arrives in the OnPaint event (which is i.e. a screen DC). Now I still need to be able to draw on memory DC, such as Graphics.FromImage, because 1) I need to do manual double buffering of my control (it's too slow to repaint every time) and also 2) I need to record metafile snapshots from my control, where ink needs to be vector, not raster. I have performed a thorough search of this forum and over Internet and found the article "Printing Ink" (http://msdn2.microsoft.com/en-us/ library/ms812505.aspx#tbconprintingink_antialiasing) that works around a similar problem by means of an unsafe (ugh) class DibGraphicsBuffer. However, there are still problems: 1) the background needs to be filled with a color, it cannot be transparent and 2) I cannot use this technique to record meta files. Now I'd like to take the opportunity to ask you MS folks to explain what is the difference between screen DC and memory DC that prevents the latter from supporting the anti-aliasing properly? What is the undelying problem? How does the Renderer do anti-aliasing for screen DC and why it cannot do for memory DC? AFAIK, GDI (without +) doesn't have any function that turns on anti-aliasing for DCs... How does DibGraphicsBuffer work? If there's a totally different approach to achieve what I want, it's also welcome. So far I've tried to draw Stroke's Bezier curves manually but that's too slow and still looks slightly different than Renderer's output. I'm using Microsoft Windows XP Tablet PC Edition SDK 1.7.2600.2181 with .NET Framework 2.0 and also going to upgrade to .NET Framework 3.5. Thanks! Oleg. |
| |||
| RE: Anti-Aliasing Problem with Ink Renderer on Memory DC - Again... See this thread in the MSDN forum: http://forums.microsoft.com/MSDN/Sho...94363&SiteID=1 Thanks, Stefan Wick http://blogs.msdn.com/swick/ "Ignoramus" wrote: > Hi, > > I'm trying to render Ink (collected somewhere else) onto my custom > control. I have run across the problem that Renderer.Draw( Graphics, > Strokes ) fails to support anti-aliasing and transparency settings of > strokes. This is not the case however, when drawing on the Graphics > object that arrives in the OnPaint event (which is i.e. a screen DC). > > Now I still need to be able to draw on memory DC, such as > Graphics.FromImage, because 1) I need to do manual double buffering of > my control (it's too slow to repaint every time) and also 2) I need to > record metafile snapshots from my control, where ink needs to be > vector, not raster. > > I have performed a thorough search of this forum and over Internet and > found the article "Printing Ink" (http://msdn2.microsoft.com/en-us/ > library/ms812505.aspx#tbconprintingink_antialiasing) that works around > a similar problem by means of an unsafe (ugh) class DibGraphicsBuffer. > However, there are still problems: 1) the background needs to be > filled with a color, it cannot be transparent and 2) I cannot use this > technique to record meta files. > > Now I'd like to take the opportunity to ask you MS folks to explain > what is the difference between screen DC and memory DC that prevents > the latter from supporting the anti-aliasing properly? What is the > undelying problem? How does the Renderer do anti-aliasing for screen > DC and why it cannot do for memory DC? AFAIK, GDI (without +) doesn't > have any function that turns on anti-aliasing for DCs... How does > DibGraphicsBuffer work? > > If there's a totally different approach to achieve what I want, it's > also welcome. So far I've tried to draw Stroke's Bezier curves > manually but that's too slow and still looks slightly different than > Renderer's output. > > I'm using Microsoft Windows XP Tablet PC Edition SDK 1.7.2600.2181 > with .NET Framework 2.0 and also going to upgrade to .NET Framework > 3.5. > > Thanks! > > Oleg. > |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Newbie confused by InkOverley.Renderer.Draw() | Christian Stapfer | Tablet PC Developers | 2 | 05-15-2007 08:00 AM |
| Can ClearType anti-aliasing be turned off? | Peter Olcott | Windows Vista | 5 | 02-11-2007 09:15 PM |
| Can Anti-Aliasing be turned of in Windows Vista? | Peter Olcott | Windows XP | 10 | 02-11-2007 06:47 PM |
| Font aliasing | Benzmum | Windows XP | 8 | 01-04-2007 07:11 AM |
| Renderer Problems with InkPicture | matt | Windows XP Tablet PC Newsgroup | 1 | 03-17-2005 09:15 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |