pen

USB HID pen requirements

Is there a USB HID pen driver in Windows Vista? If so, what are the requirements for USB descriptors, in order to make Windows Vista recognize the pen and load the pen driver? What I'm searching for is the pen equivalent to the HID mouse driver, HID keyboard driver and mass storage driver. The mentioned example drivers makes it possibl...

Why does use of pens with dash patterns cause huge (!) performance degredation in WPF custom 2D drawing?

Hope anyone can shed light on this so I can use pens with dash patterns? I am writing a scrollable chart (a Panel inside ScrollViewer that implements IScrollInfo) in WPF using DrawingVisual's DataContext.DrawX. I have several thousand DrawingVisuals that get scrolled by using TranslateTransform on the Panel that hosts them. I implement...

GDI+ DashStyle throws OutOfMemoryException in .NET

I'm using DashStyle.Dash while rendering my hierarchy of objects. My application uses Graphics.Transform extensively and I find that at some scale values (including a scale of 100%) and some angles of rotation, Graphics.DrawLine throws OutOfMemoryException when using a pen with DashStyle.Dash. Using Google I found that this is a well-kno...

Non-scaling Pen in GDI+

I need to create a pen which draws with a width of 0.5 mm regardless of the scale of the graphics transformation matrix. Here is what I am doing: Note: The sample code is C++/CLI but answers using C# are welcome. // assume that g is a Graphics object int dpi = g->DpiX; float dotsPerHalfInch = dpi * 0.5; // to extract scale factor from...

C# How to store Brush/Pen information in a database table

I need to store Brush/Pen information about several shapes in a database table, one row for each layer I draw. I was thinking of two schemes: BRUSH_INFO PEN_INFO SolidBrush(Color.Red) Pen(Color.Black) pros: only two colums cons: eval'd column BRUSH_INFO PARAM_B1 PARAM_B2 ... PEN_INFO PARAM_P1 PARAM_P2...

WPF Problem with selecting with pen

I inserted InkCanvas in my WPF Window. When I start to erase with eraser on my pen, inkCanvas automatically changes editing mode to EraseByStroke. But when I use select with pen (button on the side) he can not figure that out and remains on Ink mode. Can I do this by my self (switching mode between Ink and Select) with some Event or some...