Home > Services > DXCore Services – Graphics

DXCore Services – Graphics

October 31st, 2011

The Graphics DXCore Service provides methods for GDI graphic manipulation.

Here they are:

Method name

Description

CorrectPoint(Point, Int32, Int32) Translates the given point by the specified amount.
CorrectRectangle(Rectangle, Int32, Int32) Translates the given rectangle by the specified amount.
CorrectRectangle(Rectangle, Point) Translates the given rectangle by the specified point.
DrawArrow(Graphics, Point, Point, Int32, Color) Draws an arrow at the specified location with the specified color.
DrawText(Graphics, StringFormat, String, Font, Brush, Int32, Rectangle) Draws the specified text.
GetBitmapMask(Bitmap, Color) Returns a bitmap that is the mask of the given Bitmap using the specified color.
GetBorderPoints(TextView, SourceRange, SourcePoint, SourcePoint) Returns the left and right source points that are the border of the given source range.
GetImageFromWindow(HWND, Rectangle) Returns a bitmap copied from the specified rectangle in the specified window.
GetPathForBezierCurve(PointF, PointF, PointF, PointF, Single) Creates and returns a GraphicsPath that surrounds the bezier curve specified by the p1, c1, c2 and p2, widened by the specified radius. Returns null if the specified bezier curve has no length, or if radius is less than or equal to zero.
GetRectangleFromMaxRange (TextView, SourceRange) Returns the rectangle coordinates of the given source range.
GetScreenAt(Int32, Int32) Returns the screen at the specified coordinates.
GetScreenAt(Point) Returns the screen at the specified point.
GetTextWidth(Graphics, Font, String) Returns the exact width of the specified text.
IsValidBitmap(Bitmap) Returns false if all pixels of the bitmap have same color.
LoadIndependentBitmap(String) Loads a bitmap into memory from a filename. This method avoids the file lock that GDI+ would normally create.
MakeBitmapFromRange(TextView, SourceRange) Returns a bitmap of the specified source range.
MakeBitmapFromString(String, Graphics, Boolean, Color, Color, Color, Int32) Returns a bitmap representing the given string with the specified text and background colors.
MakeBitmapFromString(String, Graphics, Color, Color) Returns a bitmap representing the given string with the specified text and background colors.
MeasureString(Graphics, String, Font) Returns a bounding box for an unwrapped string. This method is more precise than Graphics.MeasureString, and will measure right to the end of the last character (including trailing spaces).
MeasureStringCollection (StringCollection, Graphics) Returns a bounding box for a given string collection.
PaintPlus(Graphics, Pen, Int32, PointF) Paints a “+” at the specified center point using the specified pen.
ReplaceBitmapColor(Bitmap, Color, Color) Replaces a color in a System.Drawing.Bitmap with a new color. This method works on both indexed and non-indexed bitmaps.
SetImageOpacity(Image, Single) Changes the opacity of the image.
StringRectF(Graphics, String, Font, Rectangle, StringFormat) Returns a RectagleF instance for the given string and the specified parameters.
—–
Products: DXCore
Versions: 11.1 and up
VS IDEs: any
Updated: Oct/31/2011
ID: D124

Similar Posts: