System.Drawing.Common
Opt-In flag to look for resources in the same assembly but with the "bitmapSuffix" config setting.
i.e. System.Web.UI.WebControl.Button.bmp -> System.Web.UI.WebControl.Button.VisualStudio.11.0.bmp
Opt-In flag to look for resources in the another assembly with the "bitmapSuffix" config setting
i.e. System.Web.dll -> System.Web.VisualStudio.11.0.dll
The BufferedGraphics class can be thought of as a "Token" or "Reference" to the buffer that a
BufferedGraphicsContext creates. While a BufferedGraphics is outstanding, the memory associated with the
buffer is locked. The general design is such that under normal conditions a single BufferedGraphics will be in
use at one time for a given BufferedGraphicsContext.
Determines if we need to dispose of the Context when this is disposed.
Renders the buffer to the original graphics used to allocate the buffer.
Renders the buffer to the specified target HDC.
Internal constructor, this class is created by BufferedGraphicsContext.
Allows access to the Graphics wrapper for the buffer.
Renders the buffer to the specified target graphics.
Internal method that renders the specified buffer into the target.
The BufferedGraphicsContext class can be used to perform standard double buffer rendering techniques.
Basic constructor.
Allows you to set the maximum width and height of the buffer that will be retained in memory.
You can allocate a buffer of any size, however any request for a buffer that would have a total
memory footprint larger that the maximum size will be allocated temporarily and then discarded
with the BufferedGraphics is released.
Returns a BufferedGraphics that is matched for the specified target Graphics object.
Returns a BufferedGraphics that is matched for the specified target HDC object.
Returns a BufferedGraphics that is matched for the specified target HDC object.
This routine allows us to control the point were we start using throw away
managers for painting. Since the buffer manager stays around (by default)
for the life of the app, we don't want to consume too much memory
in the buffer. However, re-allocating the buffer for small things (like
buttons, labels, etc) will hit us on runtime performance.
Returns a BufferedGraphics that is matched for the specified target HDC object.
Fills in the fields of a BITMAPINFO so that we can create a bitmap
that matches the format of the display.
This is done by creating a compatible bitmap and calling GetDIBits
to return the color masks. This is done with two calls. The first
call passes in biBitCount = 0 to GetDIBits which will fill in the
base BITMAPINFOHEADER data. The second call to GetDIBits (passing
in the BITMAPINFO filled in by the first call) will return the color
table or bitmasks, as appropriate.
True if successful, false otherwise.
Initialize the color table of the BITMAPINFO pointed to by pbmi. Colors
are set to the current system palette.
Note: call only valid for displays of 8bpp or less.
True is successful, false otherwise.
Returns a Graphics object representing a buffer.
Create a DIB section with an optimal format w.r.t. the specified hdc.
If DIB <= 8bpp, then the DIB color table is initialized based on the
specified palette. If the palette handle is NULL, then the system
palette is used.
Note: The hdc must be a direct DC (not an info or memory DC).
Note: On palettized displays, if the system palette changes the
UpdateDIBColorTable function should be called to maintain
the identity palette mapping between the DIB and the display.
A valid bitmap handle if successful, IntPtr.Zero otherwise.
Disposes the DC, but leaves the bitmap alone.
Disposes the bitmap, will ASSERT if bitmap is being used (checks oldbitmap). if ASSERTed, call DisposeDC() first.
Disposes of the Graphics buffer.
Invalidates the cached graphics buffer.
Returns a Graphics object representing a buffer.
Initializes a new instance of the class with the specified coordinates.
Gets the First character position of this .
Gets the Length of this .
Specifies alignment of content on the drawing surface.
Content is vertically aligned at the top, and horizontally aligned on the left.
Content is vertically aligned at the top, and horizontally aligned at the center.
Content is vertically aligned at the top, and horizontally aligned on the right.
Content is vertically aligned in the middle, and horizontally aligned on the left.
Content is vertically aligned in the middle, and horizontally aligned at the center.
Content is vertically aligned in the middle, and horizontally aligned on the right.
Content is vertically aligned at the bottom, and horizontally aligned on the left.
Content is vertically aligned at the bottom, and horizontally aligned at the center.
Content is vertically aligned at the bottom, and horizontally aligned on the right.
This interface defines methods for obtaining a display/window device context handle (Win32 hdc).
Note: Display and window dc handles are obtained and released using BeginPaint/EndPaint and
GetDC/ReleaseDC; this interface is intended to be used with the last method only.
Warning to implementors: Creating and releasing non-display dc handles using this interface needs
special care, for instance using other Win32 functions like CreateDC or CreateCompatibleDC require
DeleteDC instead of ReleaseDC to properly free the dc handle.
See the DeviceContext class for an implementation of this interface, it uses the Dispose method
for freeing non-display dc handles.
This is a low-level API that is expected to be used with TextRenderer or PInvoke calls.
Returns true if GDI+ has been started, but not shut down
This property will give us back a hashtable we can use to store all of our static brushes and pens on
a per-thread basis. This way we can avoid 'object in use' crashes when different threads are
referencing the same drawing object.
The ENHMETAHEADER structure is defined natively as a union with WmfHeader.
Extreme care should be taken if changing the layout of the corresponding managed
structures to minimize the risk of buffer overruns. The affected managed classes
are the following: ENHMETAHEADER, MetaHeader, MetafileHeaderWmf, MetafileHeaderEmf.
Encapsulates a GDI+ drawing surface.
Encapsulates a GDI+ drawing surface.
Handle to native DC - obtained from the GDI+ graphics object. We need to cache it to implement
IDeviceContext interface.
Callback for EnumerateMetafile methods.
This method can then call Metafile.PlayRecord to play the record that was just enumerated.
if >= MinRecordType, it's an EMF+ record
always 0 for EMF records
size of the data, or 0 if no data
pointer to the data, or NULL if no data (UINT32 aligned)
pointer to callbackData, if any
False to abort enumerating, true to continue.
Handle to native GDI+ graphics object. This object is created on demand.
Gets or sets the associated with this .
Gets or sets the interpolation mode associated with this Graphics.
Gets or sets the rendering mode for text associated with this .
Gets or sets the world transform for this .
Gets or sets the world transform elements for this .
This is a more performant alternative to that does not need disposal.
Forces immediate execution of all operations currently on the stack.
Forces execution of all operations currently on the stack.
Resets the world transform to identity.
Multiplies the that represents the world transform and .
Multiplies the that represents the world transform and .
Draws an arc from the specified ellipse.
Draws an arc from the specified ellipse.
Draws an arc from the specified ellipse.
Draws an arc from the specified ellipse.
Draws a cubic bezier curve defined by four ordered pairs that represent points.
Draws a cubic bezier curve defined by four points.
Draws a cubic bezier curve defined by four points.
Draws the outline of a rectangle specified by .
Draws the outline of the specified rectangle.
Draws the outline of the specified rectangle.
Draws the outlines of a series of rectangles.
Draws the outlines of a series of rectangles.
Draws the outline of an ellipse defined by a bounding rectangle.
Draws the outline of an ellipse defined by a bounding rectangle.
Draws the outline of an ellipse specified by a bounding rectangle.
Draws the outline of an ellipse defined by a bounding rectangle.
Draws the outline of a pie section defined by an ellipse and two radial lines.
Draws the outline of a pie section defined by an ellipse and two radial lines.
Draws the outline of a pie section defined by an ellipse and two radial lines.
Draws the outline of a pie section defined by an ellipse and two radial lines.
Draws the outline of a polygon defined by an array of points.
Draws the outline of a polygon defined by an array of points.
Draws the lines and curves defined by a .
Draws a curve defined by an array of points.
Draws a curve defined by an array of points.
Draws a curve defined by an array of points.
Draws a curve defined by an array of points.
Draws a curve defined by an array of points.
Draws a curve defined by an array of points.
Draws a closed curve defined by an array of points.
Draws a closed curve defined by an array of points.
Draws a closed curve defined by an array of points.
Draws a closed curve defined by an array of points.
Fills the entire drawing surface with the specified color.
Fills the interior of a rectangle with a .
Fills the interior of a rectangle with a .
Fills the interior of a rectangle with a .
Fills the interior of a rectangle with a .
Fills the interiors of a series of rectangles with a .
Fills the interiors of a series of rectangles with a .
Fills the interior of a polygon defined by an array of points.
Fills the interior of a polygon defined by an array of points.
Fills the interior of a polygon defined by an array of points.
Fills the interior of a polygon defined by an array of points.
Fills the interior of an ellipse defined by a bounding rectangle.
Fills the interior of an ellipse defined by a bounding rectangle.
Fills the interior of an ellipse defined by a bounding rectangle.
Fills the interior of an ellipse defined by a bounding rectangle.
Fills the interior of a pie section defined by an ellipse and two radial lines.
Fills the interior of a pie section defined by an ellipse and two radial lines.
Fills the interior of a pie section defined by an ellipse and two radial lines.
Fills the interior a closed curve defined by an array of points.
Fills the interior of a closed curve defined by an array of points.
Fills the interior a closed curve defined by an array of points.
Draws a string with the specified font.
Draws the specified image at the specified location.
Draws a line connecting the two specified points.
Draws a series of line segments that connect an array of points.
Draws a line connecting the two specified points.
Draws a line connecting the two specified points.
Draws a series of line segments that connect an array of points.
CopyPixels will perform a gdi "bitblt" operation to the source from the destination with the given size.
CopyPixels will perform a gdi "bitblt" operation to the source from the destination with the given size.
CopyPixels will perform a gdi "bitblt" operation to the source from the destination with the given size
and specified raster operation.
GDI+ will return a 'generic error' when we attempt to draw an Emf
image with width/height == 1. Here, we will hack around this by
resetting the errorstatus. Note that we don't do simple arg checking
for height || width == 1 here because transforms can be applied to
the Graphics object making it difficult to identify this scenario.
Creates a Region class only if the native region is not infinite.
The context state previous to the current Graphics context (the head of the stack).
We don't keep a GraphicsContext for the current context since it is available at any time from GDI+ and
we don't want to keep track of changes in it.
Constructor to initialize this object from a native GDI+ Graphics pointer.
Creates a new instance of the class from the specified handle to a device context.
Creates a new instance of the Graphics class from the specified handle to a device context and handle to a device.
Creates a new instance of the class from a window handle.
Creates an instance of the class from an existing .
Deletes this , and frees the memory allocated for it.
Represents an object used in connection with the printing API, it is used to hold a reference to a
PrintPreviewGraphics (fake graphics) or a printer DeviceContext (and maybe more in the future).
CopyPixels will perform a gdi "bitblt" operation to the source from the destination with the given size
and specified raster operation.
Draws a line connecting the two specified points.
Draws a series of cubic Bezier curves from an array of points.
Draws a series of cubic Bezier curves from an array of points.
Fills the interior of a path.
Fills the interior of a .
Draws this image to a graphics object. The drawing command originates on the graphics
object, but a graphics object generally has no idea how to render a given image. So,
it passes the call to the actual image. This version crops the image to the given
dimensions and allows the user to specify a rectangle within the image to draw.
Draws this image to a graphics object. The drawing command originates on the graphics
object, but a graphics object generally has no idea how to render a given image. So,
it passes the call to the actual image. This version stretches the image to the given
dimensions and allows the user to specify a rectangle within the image to draw.
Combines current Graphics context with all previous contexts.
When BeginContainer() is called, a copy of the current context is pushed into the GDI+ context stack, it keeps track of the
absolute clipping and transform but reset the public properties so it looks like a brand new context.
When Save() is called, a copy of the current context is also pushed in the GDI+ stack but the public clipping and transform
properties are not reset (cumulative). Consecutive Save context are ignored with the exception of the top one which contains
all previous information.
The return value is an object array where the first element contains the cumulative clip region and the second the cumulative
translate transform matrix.
WARNING: This method is for internal FX support only.
Gets the cumulative offset.
The cumulative offset.
Gets the cumulative offset and clip region.
The cumulative offset.
The cumulative clip region or null if the clip region is infinite.
Saves the current context into the context stack.
Pops all contexts from the specified one included. The specified context is becoming the current context.
GDI+ will return a 'generic error' with specific win32 last error codes when
a terminal server session has been closed, minimized, etc... We don't want
to throw when this happens, so we'll guard against this by looking at the
'last win32 error code' and checking to see if it is either 1) access denied
or 2) proc not found and then ignore it.
The problem is that when you lock the machine, the secure desktop is enabled and
rendering fails which is expected (since the app doesn't have permission to draw
on the secure desktop). Not sure if there's anything you can do, short of catching
the desktop switch message and absorbing all the exceptions that get thrown while
it's the secure desktop.
Specifies the unit of measure for the given data.
Specifies the world unit as the unit of measure.
Specifies 1/75 inch as the unit of measure.
Specifies a device pixel as the unit of measure.
Specifies a printer's point (1/72 inch) as the unit of measure.
Specifies the inch as the unit of measure.
Specifies the document unit (1/300 inch) as the unit of measure.
Specifies the millimeter as the unit of measure.
An abstract base class that provides functionality for 'Bitmap', 'Icon', 'Cursor', and 'Metafile' descended classes.
Creates an from the specified file.
Creates an from the specified data stream.
Cleans up Windows resources for this .
Cleans up Windows resources for this .
Saves this to the specified file.
Gets the width and height of this .
Gets the width and height of this .
Gets the width of this .
Gets the height of this .
Gets the horizontal resolution, in pixels-per-inch, of this .
Gets the vertical resolution, in pixels-per-inch, of this .
Gets attribute flags for this .
Gets the format of this .
Gets the pixel format for this .
Gets an array of the property IDs stored in this .
Gets an array of objects that describe this .
Returns the number of frames of the given dimension.
Gets the specified property item from this .
Selects the frame specified by the given dimension and index.
Sets the specified property item to the specified value.
Removes the specified property item from this .
Returns information about the codecs used for this .
Creates a from a Windows handle.
Creates a from the specified Windows handle with the specified color palette.
Returns a value indicating whether the pixel format is extended.
Returns a value indicating whether the pixel format is canonical.
Gets an array of GUIDs that represent the dimensions of frames within this .
Returns the size of the specified pixel format.
Returns a value indicating whether the pixel format contains alpha information.
Creates an exact copy of this .
Saves this to the specified file in the specified format.
Saves this to the specified file in the specified format and with the specified encoder parameters.
Saves this to the specified stream in the specified format.
Saves this to the specified stream in the specified format.
Adds an to this .
Adds an to the specified .
Gets a bounding rectangle in the specified units for this .
Gets or sets the color palette used for this .
Returns the thumbnail for this .
Animates one or more images that have time-based frames.
See the ImageInfo.cs file for the helper nested ImageInfo class.
A common pattern for using this class is as follows (See PictureBox control):
1. The winform app (user's code) calls ImageAnimator.Animate() from the main thread.
2. Animate() spawns the animating (worker) thread in the background, which will update the image
frames and raise the OnFrameChanged event, which handler will be executed in the main thread.
3. The main thread triggers a paint event (Invalidate()) from the OnFrameChanged handler.
4. From the OnPaint event, the main thread calls ImageAnimator.UpdateFrames() and then paints the
image (updated frame).
5. The main thread calls ImageAnimator.StopAnimate() when needed. This does not kill the worker thread.
Comment on locking the image ref:
We need to synchronize access to sections of code that modify the image(s), but we don't want to block
animation of one image when modifying a different one; for this, we use the image ref for locking the
critical section (lock(image)).
This class is safe for multi-threading but Image is not; multithreaded applications must use a critical
section lock using the image ref the image access is not from the same thread that executes ImageAnimator
code. If the user code locks on the image ref forever a deadlock will happen preventing the animation
from occurring.
Animates one or more images that have time-based frames. This file contains the nested ImageInfo class
- See ImageAnimator.cs for the definition of the outer class.
A list of images to be animated.
A variable to flag when an image or images need to be updated due to the selection of a new frame
in an image. We don't need to synchronize access to this variable, in the case it is true we don't
do anything, otherwise the worse case is where a thread attempts to update the image's frame after
another one did which is harmless.
The thread used for animating the images.
Lock that allows either concurrent read-access to the images list for multiple threads, or write-
access to it for a single thread. Observe that synchronization access to image objects are done
with critical sections (lock).
Flag to avoid a deadlock when waiting on a write-lock and an attempt to acquire a read-lock is
made in the same thread. If RWLock is currently owned by another thread, the current thread is going to wait on an
event using CoWaitForMultipleHandles while pumps message.
The comment above refers to the COM STA message pump, not to be confused with the UI message pump.
However, the effect is the same, the COM message pump will pump messages and dispatch them to the
window while waiting on the writer lock; this has the potential of creating a re-entrancy situation
that if during the message processing a wait on a reader lock is originated the thread will be block
on itself.
While processing STA message, the thread may call back into managed code. We do this because
we can not block finalizer thread. Finalizer thread may need to release STA objects on this thread. If
the current thread does not pump message, finalizer thread is blocked, and AD unload is blocked while
waiting for finalizer thread. RWLock is a fair lock. If a thread waits for a writer lock, then it needs
a reader lock while pumping message, the thread is blocked forever.
This TLS variable is used to flag the above situation and avoid the deadlock, it is ThreadStatic so each
thread calling into ImageAnimator is guarded against this problem.
Prevent instantiation of this class.
Advances the frame in the specified image. The new frame is drawn the next time the image is rendered.
Advances the frame in all images currently being animated. The new frame is drawn the next time the image is rendered.
Adds an image to the image manager. If the image does not support animation this method does nothing.
This method creates the image list and spawns the animation thread the first time it is called.
Whether or not the image has multiple time-based frames.
Removes an image from the image manager so it is no longer animated.
Worker thread procedure which implements the main animation loop.
NOTE: This is the ONLY code the worker thread executes, keeping it in one method helps better understand
any synchronization issues.
WARNING: Also, this is the only place where ImageInfo objects (not the contained image object) are modified,
so no access synchronization is required to modify them.
ImageAnimator nested helper class used to store extra image state info.
Whether the image supports animation.
The current frame has changed but the image has not yet been updated.
The total animation time of the image in milliseconds, or 0 if not animated.
Whether animation should progress, respecting the image's animation support
and if there are animation frames or loops remaining.
Advance the animation by the specified number of milliseconds. If the advancement
progresses beyond the end time of the current Frame,
will be called. Subscribed handlers often use that event to call
.
If the animation progresses beyond the end of the image's total animation time,
the animation will loop.
This animation does not respect a GIF's specified number of animation repeats;
instead, animations loop indefinitely.
The number of milliseconds to advance the animation by
The image this object wraps.
Selects the current frame as the active frame in the image.
Raises the FrameChanged event.
Helpers to allow using System.Numerics types like the System.Drawing equivalents.
Defines an object used to draw lines and curves.
Creates a Pen from a native GDI+ object.
Initializes a new instance of the Pen class with the specified .
Initializes a new instance of the class with the specified
and .
Initializes a new instance of the Pen class with the specified .
Initializes a new instance of the class with the specified and width.
Creates an exact copy of this .
Cleans up Windows resources for this .
Cleans up Windows resources for this .
Gets or sets the width of this .
Sets the values that determine the style of cap used to end lines drawn by this .
Gets or sets the cap style used at the beginning of lines drawn with this .
Gets or sets the cap style used at the end of lines drawn with this .
Gets or sets the cap style used at the beginning or end of dashed lines drawn with this .
Gets or sets the join style for the ends of two overlapping lines drawn with this .
Gets or sets the limit of the thickness of the join on a mitered corner.
Gets or sets the alignment for objects drawn with this .
Gets or sets the geometrical transform for objects drawn with this .
Resets the geometric transform for this to identity.
Multiplies the transform matrix for this by the specified .
Multiplies the transform matrix for this by the specified in the specified order.
Translates the local geometrical transform by the specified dimensions. This method prepends the translation
to the transform.
Translates the local geometrical transform by the specified dimensions in the specified order.
Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.
Scales the local geometric transform by the specified amounts in the specified order.
Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
Rotates the local geometric transform by the specified amount in the specified order.
Gets the style of lines drawn with this .
Gets or sets the color of this .
Gets or sets the that determines attributes of this .
Gets or sets the style used for dashed lines drawn with this .
This method is called after the user sets the pen's dash style to custom. Here, we make sure that there
is a default value set for the custom pattern.
Gets or sets the distance from the start of a line to the beginning of a dash pattern.
Gets or sets an array of custom dashes and spaces. The dashes are made up of line segments.
Gets or sets an array of custom dashes and spaces. The dashes are made up of line segments.
Gets or sets a custom cap style to use at the beginning of lines drawn with this .
Gets or sets a custom cap style to use at the end of lines drawn with this .
Specifies the different patterns available 'RotateFlipType' objects.
Encapsulates text layout information (such as alignment and linespacing), display manipulations (such as
ellipsis insertion and national digit substitution) and OpenType features.
Initializes a new instance of the class.
Initializes a new instance of the class with the specified .
Initializes a new instance of the class with the specified
and language.
Initializes a new instance of the class from the specified
existing .
Cleans up Windows resources for this .
Creates an exact copy of this .
Gets or sets a that contains formatting information.
Sets the measure of characters to the specified range.
Specifies text alignment information.
Gets or sets the line alignment.
Gets or sets the for this .
Sets tab stops for this .
Gets the tab stops for this .
Gets or sets the for this .
Gets a generic default .
Remarks from MSDN: A generic, default StringFormat object has the following characteristics:
- No string format flags are set.
- Character alignment and line alignment are set to StringAlignmentNear.
- Language ID is set to neutral language, which means that the current language associated with the calling thread is used.
- String digit substitution is set to StringDigitSubstituteUser.
- Hot key prefix is set to HotkeyPrefixNone.
- Number of tab stops is set to zero.
- String trimming is set to StringTrimmingCharacter.
Gets a generic typographic .
Remarks from MSDN: A generic, typographic StringFormat object has the following characteristics:
- String format flags StringFormatFlagsLineLimit, StringFormatFlagsNoClip, and StringFormatFlagsNoFitBlackBox are set.
- Character alignment and line alignment are set to StringAlignmentNear.
- Language ID is set to neutral language, which means that the current language associated with the calling thread is used.
- String digit substitution is set to StringDigitSubstituteUser.
- Hot key prefix is set to HotkeyPrefixNone.
- Number of tab stops is set to zero.
- String trimming is set to StringTrimmingNone.
Gets the for this .
Gets the language of for this .
Cleans up Windows resources for this .
Converts this to a human-readable string.
Defines a graphic metafile. A metafile contains records that describe a sequence of graphics operations that
can be recorded and played back.
Defines a graphic metafile. A metafile contains records that describe a sequence of graphics operations that
can be recorded and played back.
Initializes a new instance of the class from the specified handle and
.
Initializes a new instance of the class from the specified handle and
.
Initializes a new instance of the class from the specified filename.
Initializes a new instance of the class from the specified device context, bounded
by the specified rectangle.
Initializes a new instance of the class from the specified handle to a device context.
Initializes a new instance of the class from the specified device context, bounded
by the specified rectangle.
Initializes a new instance of the class from the specified device context, bounded
by the specified rectangle.
Initializes a new instance of the class from the specified device context, bounded
by the specified rectangle.
Initializes a new instance of the class from the specified device context, bounded
by the specified rectangle.
Initializes a new instance of the class from the specified device context, bounded
by the specified rectangle.
Initializes a new instance of the class from the specified device context, bounded
by the specified rectangle.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class from the specified data stream.
Initializes a new instance of the class from the specified data stream.
Initializes a new instance of the class from the specified data stream.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class from the specified data stream.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class from a native metafile handle.
Plays an EMF+ file.
Initializes a new instance of the class from the specified handle and
.
Initializes a new instance of the class from the specified stream.
Initializes a new instance of the class from the specified handle to a device context.
Initializes a new instance of the class from the specified device context, bounded
by the specified rectangle.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class from the specified data stream.
Initializes a new instance of the class with the specified filename.
Initializes a new instance of the class with the specified filename.
Returns the associated with the specified .
Returns the associated with the specified .
Returns the associated with the specified .
Returns the associated with the specified .
Returns the associated with this .
Returns a Windows handle to an enhanced .
Specifies which GDI+ objects use color adjustment information.
Defines color adjustment information that is used by all GDI+ objects that do not have their own color
adjustment information.
Defines color adjustment information for
objects.
Defines color adjustment information for objects.
Defines color adjustment information for objects.
Defines color adjustment information for text.
Specifies the number of types specified.
Specifies the number of types specified.
Specifies a range of CMYK channels.
Specifies the Cyan color channel.
Specifies the Magenta color channel.
Specifies the Yellow color channel.
Specifies the Black color channel.
This element specifies to leave the color channel unchanged from the last selected channel.
Defines a map for converting colors.
Initializes a new instance of the class.
Specifies the existing to be converted.
Specifies the new to which to convert.
Specifies the types of color maps.
A default color map.
Specifies a color map for a .
Specifies available options for color-adjusting. GDI+ can adjust color data only, grayscale data only, or both.
Both colors and grayscale are color-adjusted.
Grascale values are not color-adjusted.
Only grascale values are color-adjusted.
Specifies two modes for color component values.
Specifies that integer values supplied are 32-bit values.
Specifies that integer values supplied are 64-bit values.
Specifies the methods available in a metafile to read and write graphic commands.
Specifies the metafile type.
Windows enhanced metafile. Contains GDI commands. Metafiles of this type are referred to as an EMF file.
Windows enhanced metafile plus. Contains GDI+ commands. Metafiles of this type are referred to as an EMF+ file.
Dual Windows enhanced metafile. Contains equivalent GDI and GDI+ commands. Metafiles of this type are referred to as an EMF+ file.
An object that is initialized with the globally unique identifier for the color space category.
An object that is initialized with the globally unique identifier for the image items category.
An object that is initialized with the globally unique identifier for the save as CMYK category.
Specifies a EncoderParameter data type.
The data is an 8-bit unsigned value.
The data is an 8-bit ASCII value.
The data is a 16-bit unsigned value.
The data is a 32-bit unsigned value.
The data is two long integers, specifying the numerator and the denominator of a rational number, respectively.
Two longs which specify a range of integer values.
The first Long specifies the lower end and the second one specifies the higher end.
All values are inclusive at both ends.
An 8-bit undefined value that can take any value depending on field definition.
Two Rationals. The first Rational specifies the lower end and the second specifies the higher end.
All values are inclusive at both ends
The parameter is a pointer to a block of custom metadata.
The EncoderValue enum.
Specifies the CMYK color space.
Specifies the YCCK color space.
Specifies the LZW compression method.
For a TIFF image, specifies the CCITT3 compression method.
For a TIFF image, specifies the CCITT4 compression method.
For a TIFF image, specifies the RLE compression method.
For a TIFF image, specifies no compression.
Specifies interlaced mode.
Specifies non-interlaced mode.
For a GIF image, specifies version 87.
For a GIF images, specifies version 89a.
Specifies progressive mode.
Specifies non-progressive mode.
For a JPEG image, specifies lossless 90-degree clockwise rotation.
For a JPEG image, specifies lossless 180-degree rotation.
For a JPEG image, specifies lossless 270-degree clockwise rotation.
For a JPEG image, specifies a lossless horizontal flip.
For a JPEG image, specifies a lossless vertical flip.
Specifies multiframe encoding.
Specifies the last frame of a multi-frame image.
Specifies that the encoder object is to be closed.
For a GIF image, specifies the time frame dimension.
Specifies the resolution frame dimension.
For a TIFF image, specifies the page frame dimension
Initializes a new instance of the class with the specified GUID.
Specifies a global unique identifier (GUID) that represents this .
The time dimension.
The resolution dimension.
The page dimension.
Returns a value indicating whether the specified object is an equivalent to
this .
Converts this to a human-readable string.
Specifies the attributes of the pixel data contained in an object.
There is no format information.
Pixel data is scalable.
Pixel data contains alpha information.
Pixel data is partially scalable, but there are some limitations.
Pixel data uses an RGB color space.
Pixel data uses a CMYK color space.
Pixel data is grayscale.
Specifies the format of the image.
Initializes a new instance of the class with the specified GUID.
Specifies a global unique identifier (GUID) that represents this .
Specifies a memory bitmap image format.
Specifies the bitmap image format.
Specifies the enhanced Windows metafile image format.
Specifies the Windows metafile image format.
Specifies the GIF image format.
Specifies the JPEG image format.
Specifies the W3C PNG image format.
Specifies the Tag Image File Format (TIFF) image format.
Specifies the Exchangeable Image Format (EXIF).
Specifies the Windows icon image format.
Returns a value indicating whether the specified object is an equivalent to this
.
Returns a hash code.
Converts this to a human-readable string.
Indicates the access mode for an .
Specifies the image is read-only.
Specifies the image is write-only.
Specifies the image is read-write.
Indicates the image resides in a user input buffer, to which the user controls access.
Specifies the format of a .
Specifies an invalid type.
Specifies a standard Windows metafile.
Specifies a Windows Placeable metafile.
Specifies a Windows enhanced metafile.
Specifies a Windows enhanced metafile plus.
Specifies both enhanced and enhanced plus commands in the same file.
Specifies the type of color data in the system palette. The data can be color data with alpha, grayscale only,
or halftone data.
Specifies alpha data.
Specifies grayscale data.
Specifies halftone data.
Specifies the format of the color data for each pixel in the image.
Specifies that pixel data contains color indexed values which means they are an index to colors in the
system color table, as opposed to individual color values.
Specifies that pixel data contains GDI colors.
Specifies that pixel data contains alpha values that are not pre-multiplied.
Specifies that pixel format contains pre-multiplied alpha values.
Specifies that pixel format is undefined.
Specifies that pixel format is a don't care.
Specifies that pixel format is 1 bit per pixel indexed color. The color table therefore has two colors in it.
Specifies that pixel format is 4 bits per pixel indexed color. The color table therefore has 16 colors in it.
Specifies that pixel format is 8 bits per pixel indexed color. The color table therefore has 256 colors in it.
Specifies that pixel format is 16 bits per pixel. The color information specifies 65536 shades of gray.
Specifies that pixel format is 16 bits per pixel. The color information specifies 32768 shades of color of
which 5 bits are red, 5 bits are green and 5 bits are blue.
Specifies that pixel format is 16 bits per pixel. The color information specifies 32768 shades of color of
which 5 bits are red, 5 bits are green, 5 bits are blue and 1 bit is alpha.
Specifies that pixel format is 24 bits per pixel. The color information specifies 16777216 shades of color
of which 8 bits are red, 8 bits are green and 8 bits are blue.
Specifies that pixel format is 24 bits per pixel. The color information specifies 16777216 shades of color
of which 8 bits are red, 8 bits are green and 8 bits are blue.
Specifies that pixel format is 32 bits per pixel. The color information specifies 16777216 shades of color
of which 8 bits are red, 8 bits are green and 8 bits are blue. The 8 additional bits are alpha bits.
Specifies that pixel format is 32 bits per pixel. The color information specifies 16777216 shades of color
of which 8 bits are red, 8 bits are green and 8 bits are blue. The 8 additional bits are pre-multiplied alpha bits.
Specifies that pixel format is 48 bits per pixel. The color information specifies 16777216 shades of color
of which 8 bits are red, 8 bits are green and 8 bits are blue. The 8 additional bits are alpha bits.
Specifies pixel format is 64 bits per pixel. The color information specifies 16777216 shades of color of
which 16 bits are red, 16 bits are green and 16 bits are blue. The 16 additional bits are alpha bits.
Specifies that pixel format is 64 bits per pixel. The color information specifies 16777216 shades of color
of which 16 bits are red, 16 bits are green and 16 bits are blue. The 16 additional bits are pre-multiplied
alpha bits.
Specifies that pixel format is 64 bits per pixel. The color information specifies 16777216 shades of color
of which 16 bits are red, 16 bits are green and 16 bits are blue. The 16 additional bits are alpha bits.
Encapsulates a metadata property to be included in an image file.
Represents the ID of the property.
Represents the length of the property.
Represents the type of the property.
Contains the property value.
Defines an Placeable Metafile.
Indicates the presence of a placeable metafile header.
Stores the handle of the metafile in memory.
The x-coordinate of the upper-left corner of the bounding rectangle of the metafile image on the output device.
The y-coordinate of the upper-left corner of the bounding rectangle of the metafile image on the output device.
The x-coordinate of the lower-right corner of the bounding rectangle of the metafile image on the output device.
The y-coordinate of the lower-right corner of the bounding rectangle of the metafile image on the output device.
Indicates the number of twips per inch.
Reserved. Do not use.
Indicates the checksum value for the previous ten WORDs in the header.
Specifies the attributes of a bitmap image.
Specifies the pixel width of the .
Specifies the pixel height of the .
Specifies the stride width of the .
Specifies the format of the pixel information in this .
Specifies the address of the pixel data.
Reserved. Do not use.
EMF+ Flags
The ENHMETAHEADER structure is defined natively as a union with WmfHeader.
Extreme care should be taken if changing the layout of the corresponding managed
structures to minimize the risk of buffer overruns. The affected managed classes
are the following: ENHMETAHEADER, MetaHeader, MetafileHeaderWmf, MetafileHeaderEmf.
The ENHMETAHEADER structure is defined natively as a union with WmfHeader.
Extreme care should be taken if changing the layout of the corresponding managed
structures to minimize the risk of buffer overruns. The affected managed classes
are the following: ENHMETAHEADER, MetaHeader, MetafileHeaderWmf, MetafileHeaderEmf.
Defines a 5 x 5 matrix that contains the homogeneous coordinates for the RGBA space.
Initializes a new instance of the class.
Represents the element at the 0th row and 0th column of this .
Represents the element at the 0th row and 1st column of this .
Represents the element at the 0th row and 2nd column of this .
Represents the element at the 0th row and 3rd column of this .
Represents the element at the 0th row and 4th column of this .
Represents the element at the 1st row and 0th column of this .
Represents the element at the 1st row and 1st column of this .
Represents the element at the 1st row and 2nd column of this .
Represents the element at the 1st row and 3rd column of this .
Represents the element at the 1st row and 4th column of this .
Represents the element at the 2nd row and 0th column of this .
Represents the element at the 2nd row and 1st column of this .
Represents the element at the 2nd row and 2nd column of this .
Represents the element at the 2nd row and 3rd column of this .
Represents the element at the 2nd row and 4th column of this .
Represents the element at the 3rd row and 0th column of this .
Represents the element at the 3rd row and 1st column of this .
Represents the element at the 3rd row and 2nd column of this .
Represents the element at the 3rd row and 3rd column of this .
Represents the element at the 3rd row and 4th column of this .
Represents the element at the 4th row and 0th column of this .
Represents the element at the 4th row and 1st column of this .
Represents the element at the 4th row and 2nd column of this .
Represents the element at the 4th row and 3rd column of this .
Represents the element at the 4th row and 4th column of this .
Initializes a new instance of the class with the elements in the specified matrix.
Gets or sets the value of the specified element of this .
Defines an array of colors that make up a color palette.
Specifies how to interpret the color information in the array of colors.
Specifies an array of objects.
Gets/Sets the Encoder for the EncoderPameter.
Gets the EncoderParameterValueType object from the EncoderParameter.
Gets the EncoderParameterValueType object from the EncoderParameter.
Gets the NumberOfValues from the EncoderParameter.
Copy the EncoderParameters data into a chunk of memory to be consumed by native GDI+ code.
We need to marshal the EncoderParameters info from/to native GDI+ ourselves since the definition of the managed/unmanaged classes
are different and the native class is a bit weird. The native EncoderParameters class is defined in GDI+ as follows:
class EncoderParameters {
UINT Count; // Number of parameters in this structure
EncoderParameter Parameter[1]; // Parameter values
};
We don't have the 'Count' field since the managed array contains it. In order for this structure to work with more than one
EncoderParameter we need to preallocate memory for the extra n-1 elements, something like this:
EncoderParameters* pEncoderParameters = (EncoderParameters*) malloc(sizeof(EncoderParameters) + (n-1) * sizeof(EncoderParameter));
Also, in 64-bit platforms, 'Count' is aligned in 8 bytes (4 extra padding bytes) so we use IntPtr instead of Int32 to account for
that.
Copy the native GDI+ EncoderParameters data from a chunk of memory into a managed EncoderParameters object.
See ConvertToMemory for more info.
Contains information about how image colors are manipulated during rendering.
Initializes a new instance of the class.
Cleans up Windows resources for this .
Cleans up Windows resources for this .
Creates an exact copy of this .
Sets the 5 X 5 color adjust matrix to the specified .
Sets the 5 X 5 color adjust matrix to the specified 'Matrix' with the specified 'ColorMatrixFlags'.
Sets the 5 X 5 color adjust matrix to the specified 'Matrix' with the specified 'ColorMatrixFlags'.
Clears the color adjust matrix to all zeroes.
Clears the color adjust matrix.
Sets a color adjust matrix for image colors and a separate gray scale adjust matrix for gray scale values.
Specifies the unit of measurement for the rectangle used to size and position a metafile.
This is specified during the creation of the .
Specifies a pixel as the unit of measure.
Specifies a printer's point as the unit of measure.
Specifies an inch as the unit of measure.
Specifies 1/300 of an inch as the unit of measure.
Specifies a millimeter as the unit of measure.
Specifies .01 millimeter as the unit of measure. Provided for compatibility with GDI.
Contains attributes of an associated .
Gets the type of the associated .
Gets the size, in bytes, of the associated .
Gets the version number of the associated .
Gets the horizontal resolution, in dots-per-inch, of the associated .
Gets the vertical resolution, in dots-per-inch, of the associated .
Gets a that bounds the associated .
Returns a value indicating whether the associated is in the Windows metafile format.
Returns a value indicating whether the associated is in the Windows Placeable metafile format.
Returns a value indicating whether the associated is in the Windows enhanced metafile format.
Returns a value indicating whether the associated is in the Windows enhanced
metafile format or the Windows enhanced metafile plus.
Returns a value indicating whether the associated is in the Windows enhanced
metafile plus format.
Returns a value indicating whether the associated is in the Dual enhanced metafile
format. This format supports both the enhanced and the enhanced plus format.
Returns a value indicating whether the associated supports only the Windows
enhanced metafile plus format.
Returns a value indicating whether the associated is device-dependent.
Gets the WMF header file for the associated .
Gets the size, in bytes, of the enhanced metafile plus header file.
Gets the logical horizontal resolution, in dots-per-inch, of the associated .
Gets the logical vertical resolution, in dots-per-inch, of the associated .
Represents the type of the associated .
Represents the sizi, in bytes, of the header file.
Represents the version number of the header format.
Represents the size, in bytes, of the associated .
Specifies several of the units of measure Microsoft Win32 uses for printing.
The default unit (0.01 in.).
One thousandth of an inch (0.001 in.).
One hundredth of a millimeter (0.01 mm).
One tenth of a millimeter (0.1 mm).
Specifies print preview information for a single page. This class cannot be inherited.
Initializes a new instance of the class.
Gets the image of the printed page.
Gets the size of the printed page, in hundredths of an inch.
A PrintController which "prints" to a series of images.
Implements StartPrint for generating print preview information.
Implements StartEnd for generating print preview information.
Implements EndPage for generating print preview information.
Implements EndPrint for generating print preview information.
Represents the method that will handle the ,
, or
event of a .
Specifies the type of action for the .
Printing to a file.
Printing to a preview.
Printing to a printer.
Controls how a document is printed.
When overridden in a derived class, begins the control sequence of when and how to print a page in a document.
When overridden in a derived class, completes the control sequence of when and how to print a page in a document.
Represents a SafeHandle for a Printer's Device Mode struct handle (DEVMODE)
DEVMODEs are pretty expensive, so we cache one here and share it
with the Standard and Preview print controllers.
Specifies how to free the handle.
The boolean returned should be true for success and false if the runtime
should fire a SafeHandleCriticalFailure MDA (CustomerDebugProbe) if that
MDA is enabled.
If you have nested PrintControllers, this method won't get called on the inner one.
Add initialization code to StartPrint or StartPage instead.
Returns true if print was aborted.
If you have nested PrintControllers, this method won't get called on the inner one
Add initialization code to StartPrint or StartPage instead.
When overridden in a derived class, begins the control sequence of when and how to print a document.
When overridden in a derived class, completes the control sequence of when and how to print a document.
Represents the method that will handle the event of a .
Provides data for the event.
It's too expensive to compare 2 instances of PageSettings class, as the getters
are accessing the printer spooler, thus we track any explicit invocations of the setters or getters on this class,
and this field tracks if PageSettings property was accessed. It will return a false
positive when the user is reading property values, but we'll take a perf hit in this case assuming this event is not
used often.
Initializes a new instance of the class.
Gets or sets the page settings for the page to be printed.
Represents the method that will handle the event of a
.
Specifies the printer's duplex setting.
The printer's default duplex setting.
Single-sided printing.
Double-sided, horizontal printing.
Double-sided, vertical printing.
Represents the exception that is thrown when trying to access a printer using invalid printer settings.
Initializes a new instance of the class.
Specifies the margins of a printed page.
Initializes a new instance of a the class with one-inch margins.
Initializes a new instance of a the class with the specified left, right, top, and bottom margins.
Gets or sets the left margin, in hundredths of an inch.
Gets or sets the right margin, in hundredths of an inch.
Gets or sets the top margin, in hundredths of an inch.
Gets or sets the bottom margin, in hundredths of an inch.
Gets or sets the left margin with double value, in hundredths of an inch.
When use the setter, the ranger of setting double value should between
0 to Int.MaxValue;
Gets or sets the right margin with double value, in hundredths of an inch.
When use the setter, the ranger of setting double value should between
0 to Int.MaxValue;
Gets or sets the top margin with double value, in hundredths of an inch.
When use the setter, the ranger of setting double value should between
0 to Int.MaxValue;
Gets or sets the bottom margin with double value, in hundredths of an inch.
When use the setter, the ranger of setting double value should between
0 to Int.MaxValue;
Retrieves a duplicate of this object, member by member.
Compares this to a specified to see whether they
are equal.
Calculates and retrieves a hash code based on the left, right, top, and bottom margins.
Tests whether two objects are identical.
Tests whether two objects are different.
Provides some interesting information for the Margins in String form.
Provides a type converter to convert to and from various other representations, such as a string.
Determines if a converter can convert an object of the given source
type to the native type of the converter.
Gets a value indicating whether this converter can
convert an object to the given destination type using the context.
Converts the given object to the converter's native type.
Converts the given object to another type. The most common types to convert
are to and from a string object. The default implementation will make a call
to ToString on the object if the object is valid and if the destination
type is string. If this cannot convert to the desitnation type, this will
throw a NotSupportedException.
Determines if changing a value on this object should require a call to
CreateInstance to create a new value.
Creates an instance of this type given a set of property values
for the object. This is useful for objects that are immutable, but still
want to provide changable properties.
Specifies the standard paper sizes.
The paper size is defined by the user.
Letter paper (8.5 in. by 11 in.).
Legal paper (8.5 in. by 14 in.).
A4 paper (210 mm by 297 mm).
C paper (17 in. by 22 in.).
D paper (22 in. by 34 in.).
E paper (34 in. by 44 in.).
Letter small paper (8.5 in. by 11 in.).
Tabloid paper (11 in. by 17 in.).
Ledger paper (17 in. by 11 in.).
Statement paper (5.5 in. by 8.5 in.).
Executive paper (7.25 in. by 10.5 in.).
A3 paper (297 mm by 420 mm).
A4 small paper (210 mm by 297 mm).
A5 paper (148 mm by 210 mm).
B4 paper (250 mm by 353 mm).
B5 paper (176 mm by 250 mm).
Folio paper (8.5 in. by 13 in.).
Quarto paper (215 mm by 275 mm).
10-by-14-inch paper.
11-by-17-inch paper.
Note paper (8.5 in. by 11 in.).
#9 envelope (3.875 in. by 8.875 in.).
#10 envelope (4.125 in. by 9.5 in.).
#11 envelope (4.5 in. by 10.375 in.).
#12 envelope (4.75 in. by 11 in.).
#14 envelope (5 in. by 11.5 in.).
DL envelope (110 mm by 220 mm).
C5 envelope (162 mm by 229 mm).
C3 envelope (324 mm by 458 mm).
C4 envelope (229 mm by 324 mm).
C6 envelope (114 mm by 162 mm).
C65 envelope (114 mm by 229 mm).
B4 envelope (250 mm by 353 mm).
B5 envelope (176 mm by 250 mm).
B6 envelope (176 mm by 125 mm).
Italy envelope (110 mm by 230 mm).
Monarch envelope (3.875 in. by 7.5 in.).
6 3/4 envelope (3.625 in. by 6.5 in.).
US standard fanfold (14.875 in. by 11 in.).
German standard fanfold (8.5 in. by 12 in.).
German legal fanfold (8.5 in. by 13 in.).
ISO B4 (250 mm by 353 mm).
Japanese postcard (100 mm by 148 mm).
9-by-11-inch paper.
10-by-11-inch paper.
15-by-11-inch paper.
Invite envelope (220 mm by 220 mm).
Letter extra paper (9.275 in. by 12 in.).
This value is specific to the PostScript driver and is used only by Linotronic printers in order to conserve paper.
Legal extra paper (9.275 in. by 15 in.).
This value is specific to the PostScript driver and is used only by Linotronic printers in order to conserve paper.
Tabloid extra paper (11.69 in. by 18 in.).
This value is specific to the PostScript driver and is used only by Linotronic printers in order to conserve paper.
A4 extra paper (236 mm by 322 mm).
This value is specific to the PostScript driver and is used only by Linotronic printers in order to conserve paper.
Letter transverse paper (8.275 in. by 11 in.).
A4 transverse paper (210 mm by 297 mm).
Letter extra transverse paper (9.275 in. by 12 in.).
SuperA/SuperA/A4 paper (227 mm by 356 mm).
SuperB/SuperB/A3 paper (305 mm by 487 mm).
Letter plus paper (8.5 in. by 12.69 in.).
A4 plus paper (210 mm by 330 mm).
A5 transverse paper (148 mm by 210 mm).
JIS B5 transverse paper (182 mm by 257 mm).
A3 extra paper (322 mm by 445 mm).
A5 extra paper (174 mm by 235 mm).
ISO B5 extra paper (201 mm by 276 mm).
A2 paper (420 mm by 594 mm).
A3 transverse paper (297 mm by 420 mm).
A3 extra transverse paper (322 mm by 445 mm).
Japanese double postcard (200 mm by 148mm).
A6 paper (105 mm by 148 mm).
Japanese Kaku #2 envelope.
Japanese Kaku #3 envelope.
Japanese Chou #3 envelope.
Japanese Chou #4 envelope.
Letter rotated paper (11 in. by 8.5 in.).
A3 rotated paper (420mm by 297 mm).
A4 rotated paper (297 mm by 210 mm).
A5 rotated paper (210 mm by 148 mm).
JIS B4 rotated paper (364 mm by 257 mm).
JIS B5 rotated paper (257 mm by 182 mm).
Japanese rotated postcard (148 mm by 100 mm).
Japanese rotated double postcard (148 mm by 200 mm).
A6 rotated paper (148 mm by 105 mm).
Japanese rotated Kaku #2 envelope.
Japanese rotated Kaku #3 envelope.
Japanese rotated Chou #3 envelope.
Japanese rotated Chou #4 envelope.
JIS B6 paper (128 mm by 182 mm).
JIS B6 rotated paper (182 mm by 128 mm).
12-by-11-inch paper.
Japanese You #4 envelope.
Japanese You #4 rotated envelope.
PRC 16K paper (146 mm by 215 mm).
PRC 32K paper (97 mm by 151 mm).
PRC 32K big paper (97 mm by 151 mm).
PRC #1 envelope (102 mm by 165 mm).
PRC #2 envelope (102 mm by 176 mm).
PRC #3 envelope (125 mm by 176 mm).
PRC #4 envelope (110 mm by 208 mm).
PRC #5 envelope (110 mm by 220 mm).
PRC #6 envelope (120 mm by 230 mm).
PRC #7 envelope (160 mm by 230 mm).
PRC #8 envelope (120 mm by 309 mm).
PRC #9 envelope (229 mm by 324 mm).
PRC #10 envelope (324 mm by 458 mm).
PRC 16K rotated paper (146 mm by 215 mm).
PRC 32K rotated paper (97 mm by 151 mm).
PRC 32K big rotated paper (97 mm by 151 mm).
PRC #1 rotated envelope (165 mm by 102 mm).
PRC #2 rotated envelope (176 mm by 102 mm).
PRC #3 rotated envelope (176 mm by 125 mm).
PRC #4 rotated envelope (208 mm by 110 mm).
PRC #5 rotated envelope (220 mm by 110 mm).
PRC #6 rotated envelope (230 mm by 120 mm).
PRC #7 rotated envelope (230 mm by 160 mm).
PRC #8 rotated envelope (309 mm by 120 mm).
PRC #9 rotated envelope (324 mm by 229 mm).
PRC #10 rotated envelope (458 mm by 324 mm).
Specifies the size of a piece of paper.
Initializes a new instance of the class with default properties.
Initializes a new instance of the class.
Gets or sets the height of the paper, in hundredths of an inch.
Gets the type of paper.
Gets or sets the name of the type of paper.
Same as Kind, but values larger than or equal to DMPAPER_LAST do not map to PaperKind.Custom.
Gets or sets the width of the paper, in hundredths of an inch.
Provides some interesting information about the PaperSize in String form.
Specifies the paper tray from which the printer gets paper.
Initializes a new instance of the class with default properties.
Gets a value indicating the type of paper source.
Same as Kind, but values larger than DMBIN_USER do not map to PaperSourceKind.Custom.
Gets the name of the paper source.
Provides some interesting information about the PaperSource in String form.
Standard paper sources.
The upper bin of a printer (or, if the printer only has one bin, the only bin).
The lower bin of a printer.
The middle bin of a printer.
Manually-fed paper.
An envelope.
A manually-fed envelope.
Automatic-fed paper.
A tractor feed.
Small-format paper.
Large-format paper.
A large-capacity bin printer.
A paper cassette.
A printer-specific paper source.
Retrieves the resolution supported by a printer.
Initializes a new instance of the class with default properties.
Gets a value indicating the kind of printer resolution.
Gets the printer resolution in the horizontal direction, in dots per inch.
Gets the printer resolution in the vertical direction, in dots per inch.
Provides some interesting information about the PrinterResolution in String form.
Specifies a printer resolution.
High resolution.
Medium resolution.
Low resolution.
Draft-quality resolution.
Custom resolution.
Specifies a series of conversion methods that are useful when interoperating with the raw Win32 printing API.
This class cannot be inherited.
Converts the value, in fromUnit units, to toUnit units.
Converts the value, in fromUnit units, to toUnit units.
Converts the value, in fromUnit units, to toUnit units.
Converts the value, in fromUnit units, to toUnit units.
Converts the value, in fromUnit units, to toUnit units.
Converts the value, in fromUnit units, to toUnit units.
Specifies the option buttons in the print dialog box that designate the part of the document to print.
All pages are printed.
The pages between and are printed.
The selected pages are printed.
The current page is printed. The print dialog box requires Windows 2000 or later for this setting; if used
with an earlier operating system, all pages will be printed.
Specifies a print controller that sends information to a printer.
Implements StartPrint for printing to a physical printer.
Implements StartPage for printing to a physical printer.
Implements EndPage for printing to a physical printer.
Implements EndPrint for printing to a physical printer.
Specifies settings that apply to a single page.
Initializes a new instance of the class using the default printer.
Initializes a new instance of the class using the specified printer.
Gets the bounds of the page, taking into account the Landscape property.
Gets or sets a value indicating whether the page is printed in color.
Returns the x dimension of the hard margin
Returns the y dimension of the hard margin.
Gets or sets a value indicating whether the page should be printed in landscape or portrait orientation.
Gets or sets a value indicating the margins for this page.
Gets or sets the paper size.
Gets or sets a value indicating the paper source (i.e. upper bin).
Gets the PrintableArea for the printer. Units = 100ths of an inch.
Gets or sets the printer resolution for the page.
Gets or sets the associated printer settings.
Copies the settings and margins.
Copies the relevant information out of the PageSettings and into the handle.
Copies the relevant information out of the handle and into the PageSettings.
Provides some interesting information about the PageSettings in String form.
Defines a reusable object that sends output to the printer.
Initializes a new instance of the class.
Gets or sets the default page settings for the document being printed.
Gets or sets the name to display to the user while printing the document; for example, in a print status
dialog or a printer queue.
Gets or sets the that guides the printing process.
Gets or sets the printer on which the document is printed.
Occurs when the method is called, before the first page prints.
Occurs when is called, after the last page is printed.
Occurs when a page is printed.
Raises the event.
Raises the event.
Raises the event.
Raises the event.
Prints the document.
Provides some interesting information about the PrintDocument in String form.
Information about how a document should be printed, including which printer to print it on.
Initializes a new instance of the class.
Gets a value indicating whether the printer supports duplex (double-sided) printing.
Gets or sets the number of copies to print.
Gets or sets a value indicating whether the print out is collated.
Gets the default page settings for this printer.
Gets or sets the printer's duplex setting.
Gets or sets the first page to print.
Gets the names of all printers installed on the machine.
Gets a value indicating whether the property designates the default printer.
Gets a value indicating whether the printer is a plotter, as opposed to a raster printer.
Gets a value indicating whether the property designates a valid printer.
Gets the angle, in degrees, which the portrait orientation is rotated to produce the landscape orientation.
Gets the maximum number of copies allowed by the printer.
Gets or sets the highest or which may be selected in a print dialog box.
Gets or sets the lowest or which may be selected in a print dialog box.
Indicates the name of the printerfile.
Gets the paper sizes supported by this printer.
Gets the paper sources available on this printer.
Whether the print dialog has been displayed. In SafePrinting mode, a print dialog is required to print.
After printing, this property is set to false if the program does not have AllPrinting; this guarantees
a document is only printed once each time the print dialog is shown.
Gets or sets the pages the user has asked to print.
Indicates whether to print to a file instead of a port.
Gets or sets the name of the printer.
Gets the resolutions supported by this printer.
If the image is a JPEG or a PNG (Image.RawFormat) and the printer returns true from
ExtEscape(CHECKJPEGFORMAT) or ExtEscape(CHECKPNGFORMAT) then this function returns true.
This method utilizes the CHECKJPEGFORMAT/CHECKPNGFORMAT printer escape functions
to determine whether the printer can handle a JPEG image.
If the image is a JPEG or a PNG (Image.RawFormat) and the printer returns true
from ExtEscape(CHECKJPEGFORMAT) or ExtEscape(CHECKPNGFORMAT) then this function returns true.
Gets a value indicating whether the printer supports color printing.
Gets or sets the last page to print.
Creates an identical copy of this object.
Creates a handle to a DEVMODE structure which correspond too the printer settings.When you are done with the
handle, you must deallocate it yourself:
Interop.Kernel32.GlobalFree(handle);
Where "handle" is the return value from this method.
Creates a handle to a DEVMODE structure which correspond to the printer and page settings.
When you are done with the handle, you must deallocate it yourself:
Interop.Kernel32.GlobalFree(handle);
Where "handle" is the return value from this method.
Creates a handle to a DEVNAMES structure which correspond to the printer settings.
When you are done with the handle, you must deallocate it yourself:
Interop.Kernel32.GlobalFree(handle);
Where "handle" is the return value from this method.
Copies the relevant information out of the handle and into the PrinterSettings.
Copies the relevant information out of the handle and into the PrinterSettings.
Provides some interesting information about the PrinterSettings in String form.
Collection of PaperSize's...
Initializes a new instance of the class.
Gets a value indicating the number of paper sizes.
Retrieves the PaperSize with the specified index.
Initializes a new instance of the class.
Gets a value indicating the number of paper sources.
Gets the PaperSource with the specified index.
Initializes a new instance of the class.
Gets a value indicating the number of available printer resolutions.
Retrieves the PrinterResolution with the specified index.
Initializes a new instance of the class.
Gets a value indicating the number of strings.
Gets the string with the specified index.
Provides data for the and events.
Initializes a new instance of the class.
Initializes a new instance of the class.
Specifies which is causing this event.
Provides data for the event.
Initializes a new instance of the class.
Gets or sets a value indicating whether the print job should be canceled.
Gets the used to paint the item.
Gets or sets a value indicating whether an additional page should be printed.
Gets the rectangular area that represents the portion of the page between the margins.
Gets the rectangular area that represents the total area of the page.
Gets the page settings for the current page.
Disposes of the resources (other than memory) used by the .
Provides some interesting information about the TriState in String form.
A collection that stores objects.
Initializes a new instance of based on another
.
Initializes a new instance of containing any array of
objects.
Represents the entry at the specified index of the .
Gets a value indicating whether the contains the specified
.
Copies the values to a one-dimensional instance
at the specified index.
Returns the index of a in the .
Construct a utilizing the given .
Matrix data to construct from.
Gets/sets the elements for the matrix.
Specifies the available dash cap styles with which a can end a line.
Add cardinal splines to the path object
Adds a polygon to the current figure.
Specifies the Copy Pixel (ROP) operation.
Fills the Destination Rectangle using the color associated with the index 0 in the physical palette.
Includes any windows that are Layered on Top.
Specifies style information applied to text.
Normal text.
Bold text.
Italic text.
Underlined text.
Text with a line through the middle.
Specifies the alignment of a text string relative to its layout rectangle.
Specifies the text be aligned near the layout. In a left-to-right layout, the near position is left. In a
right-to-left layout, the near position is right.
Specifies that text is aligned in the center of the layout rectangle.
Specifies that text is aligned far from the origin position of the layout rectangle. In a left-to-right
layout, the far position is right. In a right-to-left layout, the far position is left.
Specifies style information applied to String Digit Substitute.
Specifies the display and layout information for text strings.
Specifies that text is right to left.
Specifies that text is vertical.
Specifies that no part of any glyph overhangs the bounding rectangle. By default some glyphs
overhang the rectangle slightly where necessary to appear at the edge visually. For example
when an italic lower case letter f in a font such as Garamond is aligned at the far left
of a rectangle, the lower part of the f will reach slightly further left than the left edge
of the rectangle. Setting this flag will ensure no painting outside the rectangle but will
cause the aligned edges of adjacent lines of text to appear uneven.
WARNING:
The GDI+ equivalent for this is StringFormatFlags::StringFormatFlagsNoFitBlackBox,
which is defined as 0x4. This was a mistake introduced since the first version of
the product and fixing it at this point would be a breaking change.
Causes control characters such as the left-to-right mark to be shown in the output with a representative glyph.
Disables fallback to alternate fonts for characters not supported in the requested font. Any missing characters are
displayed with the fonts missing glyph, usually an open square.
Specifies that the space at the end of each line is included in a string measurement.
Specifies that the wrapping of text to the next line is disabled. NoWrap is implied when a point of origin
is used instead of a layout rectangle. When drawing text within a rectangle, by default, text is broken at
the last word boundary that is inside the rectangle's boundary and wrapped to the next line.
Specifies that only entire lines are laid out in the layout rectangle. By default, layout
continues until the end of the text or until no more lines are visible as a result of clipping,
whichever comes first. The default settings allow the last line to be partially obscured by a
layout rectangle that is not a whole multiple of the line height.
To ensure that only whole lines are seen, set this flag and be careful to provide a layout
rectangle at least as tall as the height of one line.
Specifies that characters overhanging the layout rectangle and text extending outside the layout
rectangle are allowed to show. By default, all overhanging characters and text that extends outside
the layout rectangle are clipped. Any trailing spaces (spaces that are at the end of a line) that
extend outside the layout rectangle are clipped. Therefore, the setting of this flag will have an
effect on a string measurement if trailing spaces are being included in the measurement.
If clipping is enabled, trailing spaces that extend outside the layout rectangle are not included
in the measurement. If clipping is disabled, all trailing spaces are included in the measurement,
regardless of whether they are outside the layout rectangle.
Specifies how to trim characters from a string that does not completely fit into a layout shape.
Specifies no trimming.
Specifies that the string is broken at the boundary of the last character
that is inside the layout rectangle. This is the default.
Specifies that the string is broken at the boundary of the last word that is inside the layout rectangle.
Specifies that the string is broken at the boundary of the last character that is inside
the layout rectangle and an ellipsis (...) is inserted after the character.
Specifies that the string is broken at the boundary of the last word that is inside the
layout rectangle and an ellipsis (...) is inserted after the word.
Specifies that the center is removed from the string and replaced by an ellipsis.
The algorithm keeps as much of the last portion of the string as possible.
Specifies the units of measure for a text string.
Specifies world units as the unit of measure.
Specifies the device unit as the unit of measure.
Specifies a pixel as the unit of measure.
Specifies a printer's point as the unit of measure.
Specifies an inch as the unit of measure.
Specifies 1/300 of an inch as the unit of measure.
Specifies a millimeter as the unit of measure
Specifies a printer's em size of 32 as the unit of measure.
Specifies a generic .
A generic Serif .
A generic SansSerif .
A generic Monospace .
Specifies the type of display for hotkey prefixes for text.
No hotkey prefix.
Display the hotkey prefix.
Do not display the hotkey prefix.
Specifies the quality of text rendering.
Glyph with system default rendering hint.
Glyph bitmap with hinting.
Glyph bitmap without hinting.
Anti-aliasing with hinting.
Glyph anti-alias bitmap without hinting.
Glyph CT bitmap with hinting.
Encapsulates a collection of objects.
Initializes a new instance of the class.
Cleans up Windows resources for this .
Adds a font from the specified file to this .
Adds a font contained in system memory to this .
When inherited, enumerates the FontFamily objects in a collection of fonts.
Disposes of this
Gets the array of objects associated
with this .
Represents the fonts installed on the system.
Initializes a new instance of the class.
WeakRefCollection - a collection that holds onto weak references.
Essentially you pass in the object as it is, and under the covers
we only hold a weak reference to the object.
-----------------------------------------------------------------
!!!IMPORTANT USAGE NOTE!!!
Users of this class should set the RefCheckThreshold property
explicitly or call ScavengeReferences every once in a while to
remove dead references.
Also avoid calling Remove(item). Instead call RemoveByHashCode(item)
to make sure dead refs are removed.
Indicates the value where the collection should check its items to remove dead weakref left over.
Note: When GC collects weak refs from this collection the WeakRefObject identity changes since its
Target becomes null. This makes the item unrecognizable by the collection and cannot be
removed - Remove(item) and Contains(item) will not find it anymore.
A value of int.MaxValue means disabled by default.
Removes the value using its hash code as its identity.
This is needed because the underlying item in the collection may have already been collected changing
the identity of the WeakRefObject making it impossible for the collection to identify it.
See WeakRefObject for more info.
Wraps a weak ref object.
WARNING: Use this class carefully!
When the weak ref is collected, this object looses its identity. This is bad when the object has been
added to a collection since Contains(WeakRef(item)) and Remove(WeakRef(item)) would not be able to
identify the item.
Call this method from your Dispose(bool) to assert that unmanaged resources has been explicitly disposed.
Enumeration defining the different Graphics properties to apply to a WindowsGraphics when creating it from a
Graphics object.
Represents a Win32 device context. Provides operations for setting some of the properties of a device context.
It's the managed wrapper for an HDC.
This class is divided into two files separating the code that needs to be compiled into retail builds and
debugging code.
This class is a wrapper to a Win32 device context, and the Hdc property is the way to get a
handle to it.
The hDc is released/deleted only when owned by the object, meaning it was created internally;
in this case, the object is responsible for releasing/deleting it.
In the case the object is created from an existing hdc, it is not released; this is consistent
with the Win32 guideline that says if you call GetDC/CreateDC/CreatIC/CreateEnhMetafile, you are
responsible for calling ReleaseDC/DeleteDC/DeleteEnhMetafile respectively.
This class implements some of the operations commonly performed on the properties of a dc in WinForms,
specially for interacting with GDI+, like clipping and coordinate transformation.
Several properties are not persisted in the dc but instead they are set/reset during a more comprehensive
operation like text rendering or painting; for instance text alignment is set and reset during DrawText (GDI),
DrawString (GDI+).
Other properties are persisted from operation to operation until they are reset, like clipping,
one can make several calls to Graphics or WindowsGraphics object after setting the dc clip area and
before resetting it; these kinds of properties are the ones implemented in this class.
This kind of properties place an extra challenge in the scenario where a DeviceContext is obtained
from a Graphics object that has been used with GDI+, because GDI+ saves the hdc internally, rendering the
DeviceContext underlying hdc out of sync. DeviceContext needs to support these kind of properties to
be able to keep the GDI+ and GDI HDCs in sync.
A few other persisting properties have been implemented in DeviceContext2, among them:
1. Window origin.
2. Bounding rectangle.
3. DC origin.
4. View port extent.
5. View port origin.
6. Window extent
Other non-persisted properties just for information: Background/Foreground color, Palette, Color adjustment,
Color space, ICM mode and profile, Current pen position, Binary raster op (not supported by GDI+),
Background mode, Logical Pen, DC pen color, ARc direction, Miter limit, Logical brush, DC brush color,
Brush origin, Polygon filling mode, Bitmap stretching mode, Logical font, Intercharacter spacing,
Font mapper flags, Text alignment, Test justification, Layout, Path, Meta region.
See book "Windows Graphics Programming - Feng Yuang", P315 - Device Context Attributes.
This object's hdc. If this property is called, then the object will be used as an HDC wrapper, so the hdc
is cached and calls to GetHdc/ReleaseHdc won't PInvoke into GDI. Call Dispose to properly release the hdc.
Constructor to construct a DeviceContext object from an existing Win32 device context handle.
CreateDC creates a DeviceContext object wrapping an hdc created with the Win32 CreateDC function.
CreateIC creates a DeviceContext object wrapping an hdc created with the Win32 CreateIC function.
Used for wrapping an existing hdc. In this case, this object doesn't own the hdc so calls to
GetHdc/ReleaseHdc don't PInvoke into GDI.
Restores the device context to the specified state. The DC is restored by popping state information off a
stack created by earlier calls to the SaveHdc function.
The stack can contain the state information for several instances of the DC. If the state specified by the
specified parameter is not at the top of the stack, RestoreDC deletes all state information between the top
of the stack and the specified instance.
Specifies the saved state to be restored. If this parameter is positive, nSavedDC represents a specific
instance of the state to be restored. If this parameter is negative, nSavedDC represents an instance relative
to the current state. For example, -1 restores the most recently saved state.
See MSDN for more info.
Saves the current state of the device context by copying data describing selected objects and graphic
modes (such as the bitmap, brush, palette, font, pen, region, drawing mode, and mapping mode) to a
context stack.
The SaveDC function can be used any number of times to save any number of instances of the DC state.
A saved state can be restored by using the RestoreHdc method.
See MSDN for more details.
Selects a region as the current clipping region for the device context.
Remarks (From MSDN):
- Only a copy of the selected region is used. The region itself can be selected for any number of other device contexts or it can be deleted.
- The SelectClipRgn function assumes that the coordinates for a region are specified in device units.
- To remove a device-context's clipping region, specify a NULL region handle.
Creates a new clipping region from the intersection of the current clipping region and the specified rectangle.
Modifies the viewport origin for a device context using the specified horizontal and vertical offsets in
logical units.
This allows collections to treat DeviceContext objects wrapping the same HDC as the same objects.
Keeps a cache of some graphics primitives. Created to improve performance of TextRenderer.MeasureText methods
that don't receive a WindowsGraphics. This class maintains a cache of MRU WindowsFont objects in the process.
WindowsGraphicsCacheManager needs to track DeviceContext objects so it can ask them if a font is in use
before they it's deleted.
Represent the device type the context refers to.
WindowsGraphics is a library for rendering text and drawing using GDI; it was created to address performance
and compatibility issues found in GDI+ Graphics class.
Note: WindowsGraphics is a stateful component, DC properties are persisted from method calls, as opposed to
Graphics (GDI+) which performs atomic operations and always restores the hdc. The underlying hdc is always
saved and restored on dispose so external HDCs won't be modified by WindowsGraphics. So we don't need to
restore previous objects into the dc in method calls.
Encapsulates a GDI Region object.
Creates a WindowsRegion from a region handle, if 'takeOwnership' is true, the handle is added to the
HandleCollector and is removed & destroyed on dispose.
Creates a WindowsRegion from a System.Drawing.Region.
Combines region1 & region2 into this region. The regions cannot be null. The three regions need not be
distinct. For example, the sourceRgn1 can equal this region.
The native region handle.
A rectangle representing the window region set with the SetWindowRgn function.
Defines a particular format for text, including font face, size, and style attributes.
Gets the size of this .
Gets style information for this .
Gets a value indicating whether this is bold.
Gets a value indicating whether this is Italic.
Gets a value indicating whether this is strikeout (has a line through it).
Gets a value indicating whether this is underlined.
Gets the of this .
Gets the face name of this .
Gets the unit of measure for this .
Returns the GDI char set for this instance of a font. This will only
be valid if this font was created from a classic GDI font definition,
like a LOGFONT or HFONT, or it was passed into the constructor.
This is here for compatibility with native Win32 intrinsic controls
on non-Unicode platforms.
Determines if this font was created to represent a GDI vertical font. This will only be valid if this font
was created from a classic GDIfont definition, like a LOGFONT or HFONT, or it was passed into the constructor.
This is here for compatibility with native Win32 intrinsic controls on non-Unicode platforms.
This property is required by the framework and not intended to be used directly.
Gets the name of this .
Returns true if this is a SystemFont.
Gets the height of this .
Get native GDI+ object pointer. This property triggers the creation of the GDI+ native object if not initialized yet.
Cleans up Windows resources for this .
Cleans up Windows resources for this .
Returns the height of this Font in the specified graphics context.
Returns a value indicating whether the specified object is a equivalent to this
.
Gets the hash code for this .
Returns a human-readable string representation of this .
Creates the GDI+ native font object.
Initializes a new instance of the class from the specified existing
and .
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Initializes a new instance of the class with the specified attributes.
Constructor to initialize fields from an existing native GDI+ object reference. Used by ToLogFont.
Initializes this object's fields.
Initializes this object's fields.
Creates a from the specified Windows handle.
Creates a from the given LOGFONT using the screen device context.
A boxed LOGFONT.
The newly created .
Creates a from the given LOGFONT using the given device context.
A boxed LOGFONT.
Handle to a device context (HDC).
The newly created .
Creates a from the specified handle to a device context (HDC).
The newly created .
Creates an exact copy of this .
Returns a handle to this .
Gets the size, in points, of this .
Abstracts a group of type faces having a similar basic design but having certain variation in styles.
Abstracts a group of type faces having a similar basic design but having certain variation in styles.
Initializes a new instance of the class with the specified name.
The parameter determines how errors are handled when creating a
font based on a font family that does not exist on the end user's system at run time. If this parameter is
true, then a fall-back font will always be used instead. If this parameter is false, an exception will be thrown.
Initializes a new instance of the class with the specified name.
Initializes a new instance of the class in the specified
and with the specified name.
Initializes a new instance of the class from the specified generic font family.
Converts this to a human-readable string.
Gets a hash code for this .
Disposes of this .
Gets the name of this .
Returns the name of this in the specified language.
Returns an array that contains all of the objects associated with the current
graphics context.
Gets a generic SansSerif .
Gets a generic Serif .
Gets a generic monospace .
Returns an array that contains all of the objects associated with the specified
graphics context.
Indicates whether the specified is available.
Gets the size of the Em square for the specified style in font design units.
Returns the ascender metric for Windows.
Returns the descender metric for Windows.
Returns the distance between two consecutive lines of text for this with the
specified .
Provides methods to select bitmaps.
Returns a resource stream loaded from the appropriate location according to the current
suffix.
The assembly from which the stream is loaded
The type whose namespace is used to scope the manifest resource name
The name of the manifest resource being requested
The manifest resource stream corresponding to .
Returns a resource stream loaded from the appropriate location according to the current
suffix.
The type from whose assembly the stream is loaded and whose namespace is used to scope the resource name
The name of the manifest resource being requested
The manifest resource stream corresponding to .
The BufferedGraphicsManager is used for accessing a BufferedGraphicsContext.
Static constructor. Here, we hook the exit & unload events so we can clean up our context buffer.
Retrieves the context associated with the app domain.
Called on process exit
The ComWrappers implementation for System.Drawing.Common's COM interop usages.
Supports IStream and IPicture COM interfaces.
Contains information about the context of a Graphics object.
Disposes this and all contexts up the stack.
Disposes this and all contexts up the stack.
The state id representing the GraphicsContext.
The translate transform in the GraphicsContext.
The clipping region the GraphicsContext.
The next GraphicsContext object in the stack.
The previous GraphicsContext object in the stack.
Flag that determines whether the context was created for a Graphics.Save() operation.
This kind of contexts are cumulative across subsequent Save() calls so the top context
info is cumulative. This is not the same for contexts created for a Graphics.BeginContainer()
operation, in this case the new context information is reset. See Graphics.BeginContainer()
and Graphics.Save() for more information.
Retrieves the printer graphics during preview.
Gets the Visible bounds of this graphics object. Used during print preview.
Simple wrapper to create a screen HDC within a using statement.
ToolboxBitmapAttribute defines the images associated with a specified component.
The component can offer a small and large image (large is optional).
Get a pinnable reference to the builder.
Does not ensure there is a null char after
This overload is pattern matched in the C# 7.3+ compiler so you can omit
the explicit method call, and write eg "fixed (char* c = builder)"
Get a pinnable reference to the builder.
Ensures that the builder has a null char after
Returns the underlying storage of the builder.
Returns a span around the contents of the builder.
Ensures that the builder has a null char after
Resize the internal buffer either by doubling current buffer size or
by adding to
whichever is greater.
Number of chars requested beyond current position.
Helper class for scaling coordinates and images according to current DPI scaling set in Windows for the primary screen.
The primary screen's (device) current horizontal DPI
The primary screen's (device) current vertical DPI
Returns whether scaling is required when converting between logical-device units,
if the application opted in the automatic scaling in the .config file.
Transforms a horizontal integer coordinate from logical to device units
by scaling it up for current DPI and rounding to nearest integer value
Note: this method should be called only inside an if (DpiHelper.IsScalingRequired) clause
The horizontal value in logical units
The horizontal value in device units
Transforms a vertical integer coordinate from logical to device units
by scaling it up for current DPI and rounding to nearest integer value
Note: this method should be called only inside an if (DpiHelper.IsScalingRequired) clause
The vertical value in logical units
The vertical value in device units
Returns a new Size with the input's
dimensions converted from logical units to device units.
Note: this method should be called only inside an if (DpiHelper.IsScalingRequired) clause
Size in logical units
Size in device units
Create and return a new bitmap scaled to the specified size.
Note: this method should be called only inside an if (DpiHelper.IsScalingRequired) clause
The image to scale from logical units to device units
The size to scale image to
Create a new bitmap scaled for the device units.
When displayed on the device, the scaled image will have same size as the original image would have when displayed at 96dpi.
Note: this method should be called only inside an if (DpiHelper.IsScalingRequired) clause
The image to scale from logical units to device units
(printer name protected due to security restrictions)
Changes cannot be made to {0} because permissions are not valid.
Bitmaps that are icons cannot be made transparent. Icons natively support transparency. Use the Icon constructor to create an icon.
The color {0} is not a system color.
.NET Component
Function was ended.
File access is denied.
A Graphics object cannot be created from an image that has an indexed pixel format.
SetPixel is not supported for images with indexed pixel formats.
Destination points define a parallelogram which must have a length of 3. These points will represent the upper-left, upper-right, and lower-left coordinates (defined in that order).
Destination points must be an array with a length of 3 or 4. A length of 3 defines a parallelogram with the upper-left, upper-right, and lower-left corners. A length of 4 defines a quadrilateral with the fourth element of the array specifying the lower-rig ...
File not found.
Font '{0}' cannot be found.
Font '{0}' does not support style '{1}'.
A generic error occurred in GDI+.
Buffer is too small (internal GDI+ error).
Parameter is not valid.
Rectangle '{0}' cannot have a width or height equal to 0.
Operation requires a transformation of the image from GDI+ to GDI. GDI does not support images with a width or height greater than 32767.
Out of memory.
Not implemented.
GDI+ is not properly initialized (internal GDI+ error).
Only TrueType fonts are supported. '{0}' is not a TrueType font.
Only TrueType fonts are supported. This is not a TrueType font.
Object is currently in use elsewhere.
Overflow error.
Property cannot be found.
Property is not supported.
Unknown GDI+ error occurred.
Image format is unknown.
Current version of GDI+ does not support this feature.
Bitmap region is already locked.
(Global Assembly Cache)
BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress.
Screen-compatible bitmap cannot be created. The screen bitmap format cannot be determined.
'{0}' data length expected {1}, read {2}
Toolbox item cannot be modified.
Property {0} requires an argument of type {1}.
Data type {0} is not serializable. Items added to a property dictionary must be serializable.
Argument should be a non-empty string.
Internal state of the {0} class is invalid.
Property must be set to a valid ColorBlend object to use interpolation colors.
{0}{1} ColorBlend objects must be constructed with the same number of positions and color values. Positions must be between 0.0 and 1.0, 1.0 indicating the last element in the array.
ColorBlend object that was set is not valid.
Position's first element must be equal to 0.
Position's last element must be equal to 1.0.
Array of colors and positions must contain at least two elements.
Colors and positions do not have the same number of elements.
Value of '{1}' is not valid for '{0}'.
Value of '{0}' is not valid for font size unit.
Value of '{1}' is not valid for '{0}'. '{0}' should be greater than {2} and less than or equal to {3}.
Class name is not valid.
Color '{0}' is not valid.
DashPattern value is not valid.
Value of '{1}' is not valid for '{0}'. '{0}' should be greater than or equal to {2} and less than or equal to {3}.
Win32 handle that was passed to {0} is not valid or is the wrong type.
Image type is unknown.
Value of '{1}' is not valid for '{0}'. '{0}' must be greater than or equal to {2}.
Permission level is not valid.
Permission state is not valid.
Argument '{0}' must be a picture that can be used as a {1}.
Settings to access printer '{0}' are not valid.
No printers are installed.
Handle {0} is not valid.
Parameter must be positive and < Width.
Parameter must be positive and < Height.
Native handle is 0.
Default printer is not set.
Not implemented.
Occurs when the document is about to be printed.
The name of the document shown to the user.
The page settings of the page currently being printed.
Occurs after the document has been printed.
Indicates that the graphics origin is located at the user-specified page margins.
Retrieves the print controller for this document.
Occurs once for each page to be printed.
Retrieves the settings for the printer the document is currently being printed to.
Occurs before each page is printed. Useful for changing PageSettings for a particular page.
System.Drawing is not supported on this platform.
System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
Defines an object that sends output to a printer.
XML is not valid.
Permission level must be between PrintingPermissionLevel.NoPrinting and PrintingPermissionLevel.AllPrinting.
IDictionary parameter contains at least one entry that is not valid. Ensure all values are consistent with the object's properties.
PaperSize cannot be changed unless the Kind property is set to Custom.
Resource '{1}' cannot be found in class '{0}'.
Target does not have permission to print.
Text "{0}" cannot be parsed. The expected text format is "{1}".
TriState.Default cannot be converted into a Boolean.
(Icon)
(none)
GetObjectType on this dc returned an invalid value.
The value of argument '{0}' ({1}) is invalid for Enum type '{2}'.
{0} is not a valid value for {1}.
Invalid Blend object. It should have at least 2 elements in each of the factors and positions arrays.
Invalid Blend object. The positions array must have 0.0 as its first element.
Invalid Blend object. The positions array must have 1.0 as its last element.
Unable to load DLL '{0}': The specified module could not be found.
Unable to find an entry point named '{0}' in DLL '{1}'.
{0} only available on WMF files.
Cannot create Graphics from an indexed bitmap.
Could not open display (X-Server required. Check your DISPLAY environment variable)
Couldn't find specified file.
Icon instance was disposed.
Invalid GraphicsUnit
Invalid thumbnail size
No codec available for format:{0}
Operation not implemented under X11
(none)
No valid icon image found
Null or empty path.
Invalid parameter passed. Number of points and types must be same.
Object has been disposed.
The value of the {0} property is less than zero.
The value of the {0} property is not one of the {1} values
The directory {0} of the filename {1} does not exist.
System.Drawing.Common is not supported on this platform.
Statistics for .
The definition in isn't blittable.
Pointer to the name.
Size of the stream in bytes.
The stream mode.
Supported locking modes.
'0' means does not support lock modes.
Only for IStorage objects
Only valid for IStorage objects.
Caller is responsible for freeing the name memory.
Callee is repsonsible for allocating the name memory.
Type of the storage element. Used with .
Stat flags for .
Stat includes the name.
Stat doesn't include the name.
Stream / storage modes.
Read only, and each change to a storage or stream element is written as it occurs.
Fails if the given storage object already exists.
[STGM_DIRECT] [STGM_READ] [STGM_FAILIFTHERE] [STGM_SHARE_DENY_WRITE]
IStream interface.
This interface explicitly doesn't use the built-in COM support, but instead is only used with ComWrappers.