C# Класс Smrf.GraphicsLib.GraphicsUtil

Set of static methods that perform graphics operations not available directly through GDI+.
Do not try to instantiate an object of this type. All methods are static.
Показать файл Открыть проект

Открытые методы

Метод Описание
AreaToRadius ( Double dArea ) : Double
Clear ( Graphics oGraphics, Color oColor ) : void
CreateRoundedRectangleGraphicsPath ( Rectangle oRectangle, Int32 iCornerRadius ) : GraphicsPath
DiamondFromCenterAndHalfWidth ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : System.Drawing.PointF[]
DisposeBitmap ( Bitmap &oBitmap ) : void
DisposeBrush ( Brush &oBrush ) : void
DisposeGraphics ( Graphics &oGraphics ) : void
DisposeGraphicsPath ( GraphicsPath &oGraphicsPath ) : void
DisposePen ( Pen &oPen ) : void
DisposeSolidBrush ( SolidBrush &oSolidBrush ) : void
DistanceBetweenTwoPointFs ( PointF point1, PointF point2 ) : System.Single
Draw3DHorizontalLine ( Graphics oGraphics, System.Single fLeft, System.Single fTop, System.Single fRight ) : System.Single
DrawCircle ( Graphics oGraphics, Pen oPen, System.Single fXCenter, System.Single fYCenter, System.Single fRadius ) : void
DrawDiamond ( Graphics oGraphics, Pen oPen, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
DrawErrorStringOnGraphics ( Graphics oGraphics, Rectangle oRectangle, String sString ) : void
DrawSquare ( Graphics oGraphics, Pen oPen, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
DrawTriangle ( Graphics oGraphics, Pen oPen, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
FillCircle ( Graphics oGraphics, Brush oBrush, System.Single fXCenter, System.Single fYCenter, System.Single fRadius ) : void
FillCircle3D ( Graphics oGraphics, Color oColor, System.Single fXCenter, System.Single fYCenter, System.Single fRadius ) : void
FillDiamond ( Graphics oGraphics, Brush oBrush, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
FillSquare ( Graphics oGraphics, Brush oBrush, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
FillSquare3D ( Graphics oGraphics, Color oColor, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
FillTextRectangle ( Graphics oGraphics, Rectangle oRectangle, System.Boolean bTextIsSelected ) : void
FillTriangle ( Graphics oGraphics, Brush oBrush, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
GetDiamondEdgeMidpoints ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : System.Drawing.PointF[]
GetImageCodecInfoForMimeType ( String sMimeType ) : System.Drawing.Imaging.ImageCodecInfo
GetTriangleEdgeMidpoints ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : System.Drawing.PointF[]
LineSegmentsIntersect ( PointF endpointA1, PointF endpointA2, PointF endpointB1, PointF endpointB2 ) : System.Boolean
MoveRectangleWithinBounds ( RectangleF rectangle, RectangleF boundingRectangle, System.Boolean resizeRectangleIfNecessary ) : RectangleF
PixelsToPoints ( Graphics oGraphics, System.Single fWidthPx, System.Single fHeightPx, System.Single &fWidthPt, System.Single &fHeightPt ) : void
PointsToPixels ( Graphics oGraphics, System.Single fWidthPt, System.Single fHeightPt, Int32 &iWidthPx, Int32 &iHeightPx ) : void
PointsToPixels ( Graphics oGraphics, System.Single fWidthPt, System.Single fHeightPt, System.Single &fWidthPx, System.Single &fHeightPx ) : void
RadiusToArea ( Double dRadius ) : Double
RectangleFToRectangle ( RectangleF oRectangle, Int32 iPenWidthPx ) : Rectangle
SaveHighQualityImage ( Image oImage, String sFileName, ImageFormat eImageFormat ) : void
SaveJpegImage ( Image oImage, String sFileName, Int32 iQuality ) : void
SquareFromCenterAndHalfWidth ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : RectangleF
TriangleFromCenterAndHalfWidth ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : System.Drawing.PointF[]

Защищенные методы

Метод Описание
ConvertPixelsAndPoints ( System.Boolean bPixelsToPoints, Graphics oGraphics, System.Single fWidthIn, System.Single fHeightIn, System.Single &fWidthOut, System.Single &fHeightOut ) : void

Приватные методы

Метод Описание
GraphicsUtil ( ) : System

Do not use this contructor.

All methods on this class are static, so there is no need to create a GraphicsUtil object.

Описание методов

AreaToRadius() публичный статический Метод

public static AreaToRadius ( Double dArea ) : Double
dArea Double
Результат Double

Clear() публичный статический Метод

public static Clear ( Graphics oGraphics, Color oColor ) : void
oGraphics System.Drawing.Graphics
oColor Color
Результат void

ConvertPixelsAndPoints() защищенный статический Метод

protected static ConvertPixelsAndPoints ( System.Boolean bPixelsToPoints, Graphics oGraphics, System.Single fWidthIn, System.Single fHeightIn, System.Single &fWidthOut, System.Single &fHeightOut ) : void
bPixelsToPoints System.Boolean
oGraphics System.Drawing.Graphics
fWidthIn System.Single
fHeightIn System.Single
fWidthOut System.Single
fHeightOut System.Single
Результат void

CreateRoundedRectangleGraphicsPath() публичный статический Метод

public static CreateRoundedRectangleGraphicsPath ( Rectangle oRectangle, Int32 iCornerRadius ) : GraphicsPath
oRectangle System.Drawing.Rectangle
iCornerRadius System.Int32
Результат System.Drawing.Drawing2D.GraphicsPath

DiamondFromCenterAndHalfWidth() публичный статический Метод

public static DiamondFromCenterAndHalfWidth ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : System.Drawing.PointF[]
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат System.Drawing.PointF[]

DisposeBitmap() публичный статический Метод

public static DisposeBitmap ( Bitmap &oBitmap ) : void
oBitmap System.Drawing.Bitmap
Результат void

DisposeBrush() публичный статический Метод

public static DisposeBrush ( Brush &oBrush ) : void
oBrush System.Drawing.Brush
Результат void

DisposeGraphics() публичный статический Метод

public static DisposeGraphics ( Graphics &oGraphics ) : void
oGraphics System.Drawing.Graphics
Результат void

DisposeGraphicsPath() публичный статический Метод

public static DisposeGraphicsPath ( GraphicsPath &oGraphicsPath ) : void
oGraphicsPath System.Drawing.Drawing2D.GraphicsPath
Результат void

DisposePen() публичный статический Метод

public static DisposePen ( Pen &oPen ) : void
oPen System.Drawing.Pen
Результат void

DisposeSolidBrush() публичный статический Метод

public static DisposeSolidBrush ( SolidBrush &oSolidBrush ) : void
oSolidBrush System.Drawing.SolidBrush
Результат void

DistanceBetweenTwoPointFs() публичный статический Метод

public static DistanceBetweenTwoPointFs ( PointF point1, PointF point2 ) : System.Single
point1 System.Drawing.PointF
point2 System.Drawing.PointF
Результат System.Single

Draw3DHorizontalLine() публичный статический Метод

public static Draw3DHorizontalLine ( Graphics oGraphics, System.Single fLeft, System.Single fTop, System.Single fRight ) : System.Single
oGraphics System.Drawing.Graphics
fLeft System.Single
fTop System.Single
fRight System.Single
Результат System.Single

DrawCircle() публичный статический Метод

public static DrawCircle ( Graphics oGraphics, Pen oPen, System.Single fXCenter, System.Single fYCenter, System.Single fRadius ) : void
oGraphics System.Drawing.Graphics
oPen System.Drawing.Pen
fXCenter System.Single
fYCenter System.Single
fRadius System.Single
Результат void

DrawDiamond() публичный статический Метод

public static DrawDiamond ( Graphics oGraphics, Pen oPen, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
oGraphics System.Drawing.Graphics
oPen System.Drawing.Pen
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат void

DrawErrorStringOnGraphics() публичный статический Метод

public static DrawErrorStringOnGraphics ( Graphics oGraphics, Rectangle oRectangle, String sString ) : void
oGraphics System.Drawing.Graphics
oRectangle System.Drawing.Rectangle
sString String
Результат void

DrawSquare() публичный статический Метод

public static DrawSquare ( Graphics oGraphics, Pen oPen, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
oGraphics System.Drawing.Graphics
oPen System.Drawing.Pen
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат void

DrawTriangle() публичный статический Метод

public static DrawTriangle ( Graphics oGraphics, Pen oPen, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
oGraphics System.Drawing.Graphics
oPen System.Drawing.Pen
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат void

FillCircle() публичный статический Метод

public static FillCircle ( Graphics oGraphics, Brush oBrush, System.Single fXCenter, System.Single fYCenter, System.Single fRadius ) : void
oGraphics System.Drawing.Graphics
oBrush System.Drawing.Brush
fXCenter System.Single
fYCenter System.Single
fRadius System.Single
Результат void

FillCircle3D() публичный статический Метод

public static FillCircle3D ( Graphics oGraphics, Color oColor, System.Single fXCenter, System.Single fYCenter, System.Single fRadius ) : void
oGraphics System.Drawing.Graphics
oColor Color
fXCenter System.Single
fYCenter System.Single
fRadius System.Single
Результат void

FillDiamond() публичный статический Метод

public static FillDiamond ( Graphics oGraphics, Brush oBrush, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
oGraphics System.Drawing.Graphics
oBrush System.Drawing.Brush
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат void

FillSquare() публичный статический Метод

public static FillSquare ( Graphics oGraphics, Brush oBrush, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
oGraphics System.Drawing.Graphics
oBrush System.Drawing.Brush
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат void

FillSquare3D() публичный статический Метод

public static FillSquare3D ( Graphics oGraphics, Color oColor, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
oGraphics System.Drawing.Graphics
oColor Color
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат void

FillTextRectangle() публичный статический Метод

public static FillTextRectangle ( Graphics oGraphics, Rectangle oRectangle, System.Boolean bTextIsSelected ) : void
oGraphics System.Drawing.Graphics
oRectangle System.Drawing.Rectangle
bTextIsSelected System.Boolean
Результат void

FillTriangle() публичный статический Метод

public static FillTriangle ( Graphics oGraphics, Brush oBrush, System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : void
oGraphics System.Drawing.Graphics
oBrush System.Drawing.Brush
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат void

GetDiamondEdgeMidpoints() публичный статический Метод

public static GetDiamondEdgeMidpoints ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : System.Drawing.PointF[]
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат System.Drawing.PointF[]

GetImageCodecInfoForMimeType() публичный статический Метод

public static GetImageCodecInfoForMimeType ( String sMimeType ) : System.Drawing.Imaging.ImageCodecInfo
sMimeType String
Результат System.Drawing.Imaging.ImageCodecInfo

GetTriangleEdgeMidpoints() публичный статический Метод

public static GetTriangleEdgeMidpoints ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : System.Drawing.PointF[]
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат System.Drawing.PointF[]

LineSegmentsIntersect() публичный статический Метод

public static LineSegmentsIntersect ( PointF endpointA1, PointF endpointA2, PointF endpointB1, PointF endpointB2 ) : System.Boolean
endpointA1 System.Drawing.PointF
endpointA2 System.Drawing.PointF
endpointB1 System.Drawing.PointF
endpointB2 System.Drawing.PointF
Результат System.Boolean

MoveRectangleWithinBounds() публичный статический Метод

public static MoveRectangleWithinBounds ( RectangleF rectangle, RectangleF boundingRectangle, System.Boolean resizeRectangleIfNecessary ) : RectangleF
rectangle System.Drawing.RectangleF
boundingRectangle System.Drawing.RectangleF
resizeRectangleIfNecessary System.Boolean
Результат System.Drawing.RectangleF

PixelsToPoints() публичный статический Метод

public static PixelsToPoints ( Graphics oGraphics, System.Single fWidthPx, System.Single fHeightPx, System.Single &fWidthPt, System.Single &fHeightPt ) : void
oGraphics System.Drawing.Graphics
fWidthPx System.Single
fHeightPx System.Single
fWidthPt System.Single
fHeightPt System.Single
Результат void

PointsToPixels() публичный статический Метод

public static PointsToPixels ( Graphics oGraphics, System.Single fWidthPt, System.Single fHeightPt, Int32 &iWidthPx, Int32 &iHeightPx ) : void
oGraphics System.Drawing.Graphics
fWidthPt System.Single
fHeightPt System.Single
iWidthPx System.Int32
iHeightPx System.Int32
Результат void

PointsToPixels() публичный статический Метод

public static PointsToPixels ( Graphics oGraphics, System.Single fWidthPt, System.Single fHeightPt, System.Single &fWidthPx, System.Single &fHeightPx ) : void
oGraphics System.Drawing.Graphics
fWidthPt System.Single
fHeightPt System.Single
fWidthPx System.Single
fHeightPx System.Single
Результат void

RadiusToArea() публичный статический Метод

public static RadiusToArea ( Double dRadius ) : Double
dRadius Double
Результат Double

RectangleFToRectangle() публичный статический Метод

public static RectangleFToRectangle ( RectangleF oRectangle, Int32 iPenWidthPx ) : Rectangle
oRectangle System.Drawing.RectangleF
iPenWidthPx System.Int32
Результат System.Drawing.Rectangle

SaveHighQualityImage() публичный статический Метод

public static SaveHighQualityImage ( Image oImage, String sFileName, ImageFormat eImageFormat ) : void
oImage Image
sFileName String
eImageFormat System.Drawing.Imaging.ImageFormat
Результат void

SaveJpegImage() публичный статический Метод

public static SaveJpegImage ( Image oImage, String sFileName, Int32 iQuality ) : void
oImage Image
sFileName String
iQuality System.Int32
Результат void

SquareFromCenterAndHalfWidth() публичный статический Метод

public static SquareFromCenterAndHalfWidth ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : RectangleF
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат System.Drawing.RectangleF

TriangleFromCenterAndHalfWidth() публичный статический Метод

public static TriangleFromCenterAndHalfWidth ( System.Single fXCenter, System.Single fYCenter, System.Single fHalfWidth ) : System.Drawing.PointF[]
fXCenter System.Single
fYCenter System.Single
fHalfWidth System.Single
Результат System.Drawing.PointF[]