ImageMan.Net Version 3 Summer 2012 Release
ImGraphic Class
Members  See Also  Send Feedback
DTI.ImageMan Namespace : ImGraphic Class

Glossary Item Box

The ImGraphic class can be used to draw either onto an ImImage object, or directly onto an windows handle to a Device Context (hDC).

Object Model

ImGraphic Class


Visual Basic (Declaration) 
Public Class ImGraphic 
Visual Basic (Usage)Copy Code
Dim instance As ImGraphic
public class ImGraphic 
public class ImGraphic 
Managed Extensions for C++ 
public __gc class ImGraphic 
public ref class ImGraphic 


The ImGraphic class closely resembles the .NET Graphic class. Many of the calls are exactly the same with the same parameters in the same order. It even implements many of the exact same optional parameters by specifying multiple methods with differing numbers of parameters. This is intentional and should allow for easier conversion from the .NET graphics clas or to the .NET graphics class.

Creating a ImGraphic class couldn't be easier, simply takes the image or the dc as a single parameter. In other words, simply pass in what you are going to draw on.

Some functions have been implemented differently to facilitate ease of use. Example: MeasureString is different than what is implemented by the .NET native Graphics class. If you look online you will see that the .NET native MeasureString does not work well and that there is not an easy and consistent way to use it across different versions of the runtime. Many developers have even gone to the extent of drawing on a hidden graphic and actually measuring the text themselves by accessing the pixel data. This is cumbersome and best avoided.

Also note that some of the transforms have been combined into a single function. This is simply because there is a certain amount of overhead in setting up and tearing down a transformation, if you can make the transformation call in a single call, you will eliminate this extra overhead.

Inheritance Hierarchy



Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2014 Data Techniques, Inc. All Rights Reserved.