Documentation ¶
Index ¶
- Constants
- func GdiplusShutdown()
- type ARGB
- type Bitmap
- type Brush
- type BrushType
- type Color
- type DashCap
- type DashStyle
- type EncoderParameter
- type EncoderParameters
- type Font
- type FontCollection
- type FontFamily
- type GdiplusStartupInput
- type GdiplusStartupOutput
- type GpBitmap
- type GpBrush
- type GpBrushType
- type GpCustomLineCap
- type GpDashCap
- type GpDashStyle
- type GpFont
- type GpFontCollection
- type GpFontFamily
- type GpGraphics
- type GpImage
- type GpLineCap
- type GpLineJoin
- type GpMatrix
- type GpMatrixOrder
- type GpPath
- type GpPen
- type GpPenAlignment
- type GpPenType
- type GpRegion
- type GpSolidFill
- type GpStatus
- func GdipAddPathArc(path *GpPath, x, y, width, height, startAngle, sweepAngle float32) GpStatus
- func GdipAddPathArcI(path *GpPath, x, y, width, height int32, startAngle, sweepAngle float32) GpStatus
- func GdipAddPathLine(path *GpPath, x1, y1, x2, y2 float32) GpStatus
- func GdipAddPathLineI(path *GpPath, x1, y1, x2, y2 int32) GpStatus
- func GdipCloneBrush(brush *GpBrush, clone **GpBrush) GpStatus
- func GdipClonePen(pen *GpPen, clonepen **GpPen) GpStatus
- func GdipClosePathFigure(path *GpPath) GpStatus
- func GdipClosePathFigures(path *GpPath) GpStatus
- func GdipCreateBitmapFromFile(filename *uint16, bitmap **GpBitmap) GpStatus
- func GdipCreateBitmapFromHBITMAP(hbm HBITMAP, hpal HPALETTE, bitmap **GpBitmap) GpStatus
- func GdipCreateBitmapFromScan0(width, height, stride int32, format PixelFormat, scan0 *byte, ...) GpStatus
- func GdipCreateFont(fontFamily *GpFontFamily, emSize float32, style int32, unit GpUnit, ...) GpStatus
- func GdipCreateFontFamilyFromName(name *uint16, fontCollection *GpFontCollection, fontFamily **GpFontFamily) GpStatus
- func GdipCreateFontFromDC(hdc HDC, font **GpFont) GpStatus
- func GdipCreateFromHDC(hdc HDC, graphics **GpGraphics) GpStatus
- func GdipCreateFromHDC2(hdc HDC, hDevice HANDLE, graphics **GpGraphics) GpStatus
- func GdipCreateFromHWND(hwnd HWND, graphics **GpGraphics) GpStatus
- func GdipCreateFromHWNDICM(hwnd HWND, graphics **GpGraphics) GpStatus
- func GdipCreateHBITMAPFromBitmap(bitmap *GpBitmap, hbmReturn *HBITMAP, background ARGB) GpStatus
- func GdipCreatePath(brushMode int32, path **GpPath) GpStatus
- func GdipCreatePen1(color ARGB, width float32, unit GpUnit, pen **GpPen) GpStatus
- func GdipCreatePen2(brush *GpBrush, width float32, unit GpUnit, pen **GpPen) GpStatus
- func GdipCreateSolidFill(color ARGB, brush **GpSolidFill) GpStatus
- func GdipCreateStringFormat(formatAttributes int32, language uint16, format **GpStringFormat) GpStatus
- func GdipDeleteBrush(brush *GpBrush) GpStatus
- func GdipDeleteFont(font *GpFont) GpStatus
- func GdipDeleteFontFamily(fontFamily *GpFontFamily) GpStatus
- func GdipDeleteGraphics(graphics *GpGraphics) GpStatus
- func GdipDeletePath(path *GpPath) GpStatus
- func GdipDeletePen(pen *GpPen) GpStatus
- func GdipDeleteStringFormat(format *GpStringFormat) GpStatus
- func GdipDisposeImage(image *GpImage) GpStatus
- func GdipDrawArc(graphics *GpGraphics, pen *GpPen, ...) GpStatus
- func GdipDrawArcI(graphics *GpGraphics, pen *GpPen, x, y, width, height int32, ...) GpStatus
- func GdipDrawBezier(graphics *GpGraphics, pen *GpPen, x1, y1, x2, y2, x3, y3, x4, y4 float32) GpStatus
- func GdipDrawBezierI(graphics *GpGraphics, pen *GpPen, x1, y1, x2, y2, x3, y3, x4, y4 int32) GpStatus
- func GdipDrawEllipse(graphics *GpGraphics, pen *GpPen, x, y, width, height float32) GpStatus
- func GdipDrawEllipseI(graphics *GpGraphics, pen *GpPen, x, y, width, height int32) GpStatus
- func GdipDrawImage(graphics *GpGraphics, image *GpImage, x, y float32) GpStatus
- func GdipDrawImageI(graphics *GpGraphics, image *GpImage, x, y int32) GpStatus
- func GdipDrawImageRect(graphics *GpGraphics, image *GpImage, x, y, width, height float32) GpStatus
- func GdipDrawImageRectI(graphics *GpGraphics, image *GpImage, x, y, width, height int32) GpStatus
- func GdipDrawLine(graphics *GpGraphics, pen *GpPen, x1, y1, x2, y2 float32) GpStatus
- func GdipDrawLineI(graphics *GpGraphics, pen *GpPen, x1, y1, x2, y2 int32) GpStatus
- func GdipDrawPath(graphics *GpGraphics, pen *GpPen, path *GpPath) GpStatus
- func GdipDrawPie(graphics *GpGraphics, pen *GpPen, ...) GpStatus
- func GdipDrawPieI(graphics *GpGraphics, pen *GpPen, x, y, width, height int32, ...) GpStatus
- func GdipDrawPolygon(graphics *GpGraphics, pen *GpPen, points *PointF, count int32) GpStatus
- func GdipDrawPolygonI(graphics *GpGraphics, pen *GpPen, points *Point, count int32) GpStatus
- func GdipDrawRectangle(graphics *GpGraphics, pen *GpPen, x, y, width, height float32) GpStatus
- func GdipDrawRectangleI(graphics *GpGraphics, pen *GpPen, x, y, width, height int32) GpStatus
- func GdipDrawString(graphics *GpGraphics, text *uint16, length int32, font *GpFont, ...) GpStatus
- func GdipFillEllipse(graphics *GpGraphics, brush *GpBrush, x, y, width, height float32) GpStatus
- func GdipFillEllipseI(graphics *GpGraphics, brush *GpBrush, x, y, width, height int32) GpStatus
- func GdipFillPath(graphics *GpGraphics, brush *GpBrush, path *GpPath) GpStatus
- func GdipFillPolygon(graphics *GpGraphics, brush *GpBrush, points *PointF, count int32, ...) GpStatus
- func GdipFillPolygonI(graphics *GpGraphics, brush *GpBrush, points *Point, count int32, ...) GpStatus
- func GdipFillRectangle(graphics *GpGraphics, brush *GpBrush, x, y, width, height float32) GpStatus
- func GdipFillRectangleI(graphics *GpGraphics, brush *GpBrush, x, y, width, height int32) GpStatus
- func GdipGetBrushType(brush *GpBrush, brushType *GpBrushType) GpStatus
- func GdipGetDC(graphics *GpGraphics, hdc *HDC) GpStatus
- func GdipGetImageGraphicsContext(image *GpImage, graphics **GpGraphics) GpStatus
- func GdipGetImageHeight(image *GpImage, height *uint32) GpStatus
- func GdipGetImageWidth(image *GpImage, width *uint32) GpStatus
- func GdipGetPenBrushFill(pen *GpPen, brush **GpBrush) GpStatus
- func GdipGetPenColor(pen *GpPen, argb *ARGB) GpStatus
- func GdipGetPenCompoundArray(pen *GpPen, dash *float32, count int32) GpStatus
- func GdipGetPenCompoundCount(pen *GpPen, count *int32) GpStatus
- func GdipGetPenCustomEndCap(pen *GpPen, customCap **GpCustomLineCap) GpStatus
- func GdipGetPenCustomStartCap(pen *GpPen, customCap **GpCustomLineCap) GpStatus
- func GdipGetPenDashArray(pen *GpPen, dash *float32, count int32) GpStatus
- func GdipGetPenDashCap197819(pen *GpPen, dashCap *GpDashCap) GpStatus
- func GdipGetPenDashCount(pen *GpPen, count *int32) GpStatus
- func GdipGetPenDashOffset(pen *GpPen, offset *float32) GpStatus
- func GdipGetPenDashStyle(pen *GpPen, dashStyle *GpDashStyle) GpStatus
- func GdipGetPenEndCap(pen *GpPen, endCap *GpLineCap) GpStatus
- func GdipGetPenFillType(pen *GpPen, penType *GpPenType) GpStatus
- func GdipGetPenLineJoin(pen *GpPen, lineJoin *GpLineJoin) GpStatus
- func GdipGetPenMiterLimit(pen *GpPen, miterLimit *float32) GpStatus
- func GdipGetPenMode(pen *GpPen, penMode *GpPenAlignment) GpStatus
- func GdipGetPenStartCap(pen *GpPen, startCap *GpLineCap) GpStatus
- func GdipGetPenTransform(pen *GpPen, matrix *GpMatrix) GpStatus
- func GdipGetPenWidth(pen *GpPen, width *float32) GpStatus
- func GdipGetSolidFillColor(brush *GpBrush, color *ARGB) GpStatus
- func GdipGraphicsClear(graphics *GpGraphics, color ARGB) GpStatus
- func GdipLoadImageFromFile(filename *uint16, image **GpImage) GpStatus
- func GdipMeasureCharacterRanges(graphics *GpGraphics, text *uint16, length int32, font *GpFont, ...) GpStatus
- func GdipMeasureString(graphics *GpGraphics, text *uint16, length int32, font *GpFont, ...) GpStatus
- func GdipMultiplyPenTransform(pen *GpPen, matrix *GpMatrix, order GpMatrixOrder) GpStatus
- func GdipNewInstalledFontCollection(fontCollection **GpFontCollection) GpStatus
- func GdipReleaseDC(graphics *GpGraphics, hdc HDC) GpStatus
- func GdipResetPenTransform(pen *GpPen) GpStatus
- func GdipRotatePenTransform(pen *GpPen, angle float32, order GpMatrixOrder) GpStatus
- func GdipSaveImageToFile(image *GpBitmap, filename *uint16, clsidEncoder *ole.GUID, ...) GpStatus
- func GdipScalePenTransform(pen *GpPen, sx, sy float32, order GpMatrixOrder) GpStatus
- func GdipSetCompositingMode(graphics *GpGraphics, mode int32) GpStatus
- func GdipSetCompositingQuality(graphics *GpGraphics, quality int32) GpStatus
- func GdipSetInterpolationMode(graphics *GpGraphics, mode int32) GpStatus
- func GdipSetPenBrushFill(pen *GpPen, brush *GpBrush) GpStatus
- func GdipSetPenColor(pen *GpPen, argb ARGB) GpStatus
- func GdipSetPenCompoundArray(pen *GpPen, dash *float32, count int32) GpStatus
- func GdipSetPenCustomEndCap(pen *GpPen, customCap *GpCustomLineCap) GpStatus
- func GdipSetPenCustomStartCap(pen *GpPen, customCap *GpCustomLineCap) GpStatus
- func GdipSetPenDashArray(pen *GpPen, dash *float32, count int32) GpStatus
- func GdipSetPenDashCap197819(pen *GpPen, dashCap GpDashCap) GpStatus
- func GdipSetPenDashOffset(pen *GpPen, offset float32) GpStatus
- func GdipSetPenDashStyle(pen *GpPen, dashStyle GpDashStyle) GpStatus
- func GdipSetPenEndCap(pen *GpPen, endCap GpLineCap) GpStatus
- func GdipSetPenLineCap197819(pen *GpPen, startCap, endCap GpLineCap, dashCap GpDashCap) GpStatus
- func GdipSetPenLineJoin(pen *GpPen, lineJoin GpLineJoin) GpStatus
- func GdipSetPenMiterLimit(pen *GpPen, miterLimit float32) GpStatus
- func GdipSetPenMode(pen *GpPen, penMode GpPenAlignment) GpStatus
- func GdipSetPenStartCap(pen *GpPen, startCap GpLineCap) GpStatus
- func GdipSetPenTransform(pen *GpPen, matrix *GpMatrix) GpStatus
- func GdipSetPenWidth(pen *GpPen, width float32) GpStatus
- func GdipSetPixelOffsetMode(graphics *GpGraphics, mode int32) GpStatus
- func GdipSetRenderingOrigin(graphics *GpGraphics, x, y int32) GpStatus
- func GdipSetSmoothingMode(graphics *GpGraphics, mode int32) GpStatus
- func GdipSetSolidFillColor(brush *GpBrush, color ARGB) GpStatus
- func GdipSetTextRenderingHint(graphics *GpGraphics, hint int32) GpStatus
- func GdipStringFormatGetGenericTypographic(format **GpStringFormat) GpStatus
- func GdipTranslatePenTransform(pen *GpPen, dx, dy float32, order GpMatrixOrder) GpStatus
- func GdiplusStartup(input *GdiplusStartupInput, output *GdiplusStartupOutput) GpStatus
- type GpStringFormat
- type GpUnit
- type Graphics
- func (g *Graphics) Clear(color *Color)
- func (g *Graphics) Dispose()
- func (g *Graphics) DrawArc(pen *Pen, x, y, width, height, startAngle, sweepAngle float32)
- func (g *Graphics) DrawArcI(pen *Pen, x, y, width, height int32, startAngle, sweepAngle float32)
- func (g *Graphics) DrawBezier(pen *Pen, x1, y1, x2, y2, x3, y3, x4, y4 float32)
- func (g *Graphics) DrawBezierI(pen *Pen, x1, y1, x2, y2, x3, y3, x4, y4 int32)
- func (g *Graphics) DrawEllipse(pen *Pen, x, y, width, height float32)
- func (g *Graphics) DrawEllipseI(pen *Pen, x, y, width, height int32)
- func (g *Graphics) DrawImage(image *Image, x, y float32)
- func (g *Graphics) DrawImageI(image *Image, x, y int32)
- func (g *Graphics) DrawImageRect(image *Image, x, y, width, height float32)
- func (g *Graphics) DrawImageRectI(image *Image, x, y, width, height int32)
- func (g *Graphics) DrawLine(pen *Pen, x1, y1, x2, y2 float32)
- func (g *Graphics) DrawLineI(pen *Pen, x1, y1, x2, y2 int32)
- func (g *Graphics) DrawPath(pen *Pen, path *GraphicsPath)
- func (g *Graphics) DrawPie(pen *Pen, x, y, width, height, startAngle, sweepAngle float32)
- func (g *Graphics) DrawPieI(pen *Pen, x, y, width, height int32, startAngle, sweepAngle float32)
- func (g *Graphics) DrawPolygon(pen *Pen, points []PointF)
- func (g *Graphics) DrawPolygonI(pen *Pen, points []Point)
- func (g *Graphics) DrawRectangle(pen *Pen, x, y, width, height float32)
- func (g *Graphics) DrawRectangleI(pen *Pen, x, y, width, height int32)
- func (g *Graphics) DrawString(text string, font *Font, origin *PointF, brush *Brush)
- func (g *Graphics) DrawStringEx(text string, font *Font, rect *RectF, format *StringFormat, brush *Brush)
- func (g *Graphics) FillEllipse(brush *Brush, x, y, width, height float32)
- func (g *Graphics) FillEllipseI(brush *Brush, x, y, width, height int32)
- func (g *Graphics) FillPath(brush *Brush, path *GraphicsPath)
- func (g *Graphics) FillPolygon(brush *Brush, points []PointF, fillMode int32)
- func (g *Graphics) FillPolygonI(brush *Brush, points []Point, fillMode int32)
- func (g *Graphics) FillRectangle(brush *Brush, x, y, width, height float32)
- func (g *Graphics) FillRectangleI(brush *Brush, x, y, width, height int32)
- func (g *Graphics) GetDC() (hdc HDC)
- func (g *Graphics) MeasureCharacterRanges(text string, font *Font, layoutRect *RectF, stringFormat *StringFormat, ...)
- func (g *Graphics) MeasureString(text string, font *Font, layoutRect *RectF, stringFormat *StringFormat, ...)
- func (g *Graphics) MeasureStringEx(text string, font *Font, layoutRect *RectF, stringFormat *StringFormat, ...)
- func (g *Graphics) ReleaseDC(hdc HDC)
- func (g *Graphics) SetCompositingMode(mode int32)
- func (g *Graphics) SetCompositingQuality(quality int32)
- func (g *Graphics) SetInterpolationMode(mode int32)
- func (g *Graphics) SetPixelOffsetMode(mode int32)
- func (g *Graphics) SetRenderingOrigin(x, y int32)
- func (g *Graphics) SetSmoothingMode(mode int32)
- func (g *Graphics) SetTextRenderingHint(hint int32)
- type GraphicsPath
- func (p *GraphicsPath) AddArc(x, y, width, height, startAngle, sweepAngle float32)
- func (p *GraphicsPath) AddArcI(x, y, width, height int32, startAngle, sweepAngle float32)
- func (p *GraphicsPath) AddArcRect(rect *Rect, startAngle, sweepAngle float32)
- func (p *GraphicsPath) AddArcRectF(rect *RectF, startAngle, sweepAngle float32)
- func (p *GraphicsPath) AddLine(x1, y1, x2, y2 float32)
- func (p *GraphicsPath) AddLineI(x1, y1, x2, y2 int32)
- func (p *GraphicsPath) CloseAllFigures()
- func (p *GraphicsPath) CloseFigure()
- func (p *GraphicsPath) Dispose()
- type HANDLE
- type HBITMAP
- type HDC
- type HPALETTE
- type HWND
- type Image
- type LineCap
- type LineJoin
- type MatrixOrder
- type Pen
- func (p *Pen) Clone() *Pen
- func (p *Pen) Dispose()
- func (p *Pen) GetBrush() *Brush
- func (p *Pen) GetColor() (color Color)
- func (p *Pen) GetCompoundArray(dash *float32, count int32)
- func (p *Pen) GetCompoundCount() (count int32)
- func (p *Pen) GetCustomEndCap() (customCap *GpCustomLineCap)
- func (p *Pen) GetCustomStartCap() (customCap *GpCustomLineCap)
- func (p *Pen) GetDashArray(dash *float32, count int32)
- func (p *Pen) GetDashCap() (dashCap DashCap)
- func (p *Pen) GetDashCount() (count int32)
- func (p *Pen) GetDashOffset() (offset float32)
- func (p *Pen) GetDashStyle() (dashStyle DashStyle)
- func (p *Pen) GetEndCap() (endCap LineCap)
- func (p *Pen) GetLineJoin() (lineJoin LineJoin)
- func (p *Pen) GetMiterLimit() (miterLimit float32)
- func (p *Pen) GetMode() (penMode PenAlignment)
- func (p *Pen) GetPenType() (penType PenType)
- func (p *Pen) GetStartCap() (startCap LineCap)
- func (p *Pen) GetTransform(matrix *GpMatrix)
- func (p *Pen) GetWidth() (width float32)
- func (p *Pen) MultiplyTransform(matrix *GpMatrix, order MatrixOrder)
- func (p *Pen) ResetTransform()
- func (p *Pen) RotateTransform(angle float32, order MatrixOrder)
- func (p *Pen) ScaleTransform(sx, sy float32, order MatrixOrder)
- func (p *Pen) SetBrush(brush *Brush)
- func (p *Pen) SetColor(color *Color)
- func (p *Pen) SetCompoundArray(dash []float32)
- func (p *Pen) SetCustomEndCap(customCap *GpCustomLineCap)
- func (p *Pen) SetCustomStartCap(customCap *GpCustomLineCap)
- func (p *Pen) SetDashArray(dash []float32)
- func (p *Pen) SetDashCap(dashCap DashCap)
- func (p *Pen) SetDashOffset(offset float32)
- func (p *Pen) SetDashStyle(dashStyle DashStyle)
- func (p *Pen) SetEndCap(endCap LineCap)
- func (p *Pen) SetLineCap(startCap, endCap LineCap, dashCap DashCap)
- func (p *Pen) SetLineJoin(lineJoin LineJoin)
- func (p *Pen) SetMiterLimit(miterLimit float32)
- func (p *Pen) SetMode(penMode PenAlignment)
- func (p *Pen) SetStartCap(startCap LineCap)
- func (p *Pen) SetTransform(matrix *GpMatrix)
- func (p *Pen) SetWidth(width float32)
- func (p *Pen) TranslateTransform(dx, dy float32, order MatrixOrder)
- type PenAlignment
- type PenType
- type PixelFormat
- type Point
- type PointF
- type Rect
- type RectF
- type SolidBrush
- type StringFormat
Constants ¶
View Source
const ( UnitWorld = 0 // 0 -- World coordinate (non-physical unit) UnitDisplay = 1 // 1 -- Variable -- for PageTransform only UnitPixel = 2 // 2 -- Each unit is one device pixel. UnitPoint = 3 // 3 -- Each unit is a printer's point, or 1/72 inch. UnitInch = 4 // 4 -- Each unit is 1 inch. UnitDocument = 5 // 5 -- Each unit is 1/300 inch. UnitMillimeter = 6 // 6 -- Each unit is 1 millimeter. )
Unit
View Source
const ( AlphaShift = 24 RedShift = 16 GreenShift = 8 BlueShift = 0 )
View Source
const ( AlphaMask = 0xff000000 RedMask = 0x00ff0000 GreenMask = 0x0000ff00 BlueMask = 0x000000ff )
View Source
const ( FontStyleRegular = 0 FontStyleBold = 1 FontStyleItalic = 2 FontStyleBoldItalic = 3 FontStyleUnderline = 4 FontStyleStrikeout = 8 )
FontStyle
View Source
const ( QualityModeInvalid = iota - 1 QualityModeDefault QualityModeLow // Best performance QualityModeHigh // Best rendering quality )
QualityMode
View Source
const ( CompositingModeSourceOver = iota // 0 CompositingModeSourceCopy // 1 )
Alpha Compositing mode
View Source
const ( CompositingQualityInvalid = iota + QualityModeInvalid CompositingQualityDefault CompositingQualityHighSpeed CompositingQualityHighQuality CompositingQualityGammaCorrected CompositingQualityAssumeLinear )
Alpha Compositing quality
View Source
const ( InterpolationModeInvalid = iota + QualityModeInvalid InterpolationModeDefault InterpolationModeLowQuality InterpolationModeHighQuality InterpolationModeBilinear InterpolationModeBicubic InterpolationModeNearestNeighbor InterpolationModeHighQualityBilinear InterpolationModeHighQualityBicubic )
InterpolationMode
View Source
const ( SmoothingModeInvalid = iota + QualityModeInvalid SmoothingModeDefault SmoothingModeHighSpeed SmoothingModeHighQuality SmoothingModeNone SmoothingModeAntiAlias )
SmoothingMode
View Source
const ( PixelOffsetModeInvalid = iota + QualityModeInvalid PixelOffsetModeDefault PixelOffsetModeHighSpeed PixelOffsetModeHighQuality PixelOffsetModeNone // No pixel offset PixelOffsetModeHalf // Offset by -0.5, -0.5 for fast anti-alias perf )
Pixel Format Mode
View Source
const ( TextRenderingHintSystemDefault = iota // Glyph with system default rendering hint TextRenderingHintSingleBitPerPixelGridFit // Glyph bitmap with hinting TextRenderingHintSingleBitPerPixel // Glyph bitmap without hinting TextRenderingHintAntiAliasGridFit // Glyph anti-alias bitmap with hinting TextRenderingHintAntiAlias // Glyph anti-alias bitmap without hinting TextRenderingHintClearTypeGridFit // Glyph CT bitmap with hinting )
Text Rendering Hint
View Source
const ( FillModeAlternate = iota // 0 FillModeWinding // 1 )
Fill mode constants
View Source
const ( PixelFormatIndexed = 0x00010000 // Indexes into a palette PixelFormatGDI = 0x00020000 // Is a GDI-supported format PixelFormatAlpha = 0x00040000 // Has an alpha component PixelFormatPAlpha = 0x00080000 // Pre-multiplied alpha PixelFormatExtended = 0x00100000 // Extended color 16 bits/channel PixelFormatCanonical = 0x00200000 PixelFormatUndefined = 0 PixelFormatDontCare = 0 PixelFormat1bppIndexed = (1 | (1 << 8) | PixelFormatIndexed | PixelFormatGDI) PixelFormat4bppIndexed = (2 | (4 << 8) | PixelFormatIndexed | PixelFormatGDI) PixelFormat8bppIndexed = (3 | (8 << 8) | PixelFormatIndexed | PixelFormatGDI) PixelFormat16bppGrayScale = (4 | (16 << 8) | PixelFormatExtended) PixelFormat16bppRGB555 = (5 | (16 << 8) | PixelFormatGDI) PixelFormat16bppRGB565 = (6 | (16 << 8) | PixelFormatGDI) PixelFormat16bppARGB1555 = (7 | (16 << 8) | PixelFormatAlpha | PixelFormatGDI) PixelFormat24bppRGB = (8 | (24 << 8) | PixelFormatGDI) PixelFormat32bppRGB = (9 | (32 << 8) | PixelFormatGDI) PixelFormat32bppARGB = (10 | (32 << 8) | PixelFormatAlpha | PixelFormatGDI | PixelFormatCanonical) PixelFormat32bppPARGB = (11 | (32 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatGDI) PixelFormat48bppRGB = (12 | (48 << 8) | PixelFormatExtended) PixelFormat64bppARGB = (13 | (64 << 8) | PixelFormatAlpha | PixelFormatCanonical | PixelFormatExtended) PixelFormat64bppPARGB = (14 | (64 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatExtended) PixelFormat32bppCMYK = (15 | (32 << 8)) PixelFormatMax = 16 )
View Source
const LANG_NEUTRAL = 0x00
Variables ¶
This section is empty.
Functions ¶
func GdiplusShutdown ¶
func GdiplusShutdown()
Types ¶
type Bitmap ¶
type Bitmap struct {
Image
}
func NewBitmap ¶
func NewBitmap(width, height int32, format PixelFormat) *Bitmap
func NewBitmapEx ¶
func NewBitmapEx(width, height, stride int32, format PixelFormat, scan0 *byte) *Bitmap
func NewBitmapFromFile ¶
func NewBitmapFromHBITMAP ¶
type Brush ¶
type Brush struct {
// contains filtered or unexported fields
}
func (*Brush) GetBrushType ¶
type BrushType ¶
type BrushType GpBrushType
type DashStyle ¶
type DashStyle GpDashStyle
type EncoderParameter ¶
type EncoderParameters ¶
type EncoderParameters struct { Count uint32 Parameter [1]EncoderParameter }
type FontCollection ¶
type FontCollection struct {
// contains filtered or unexported fields
}
type FontFamily ¶
type FontFamily struct {
// contains filtered or unexported fields
}
func NewFontFamily ¶
func NewFontFamily(familyName string, fontCollection *FontCollection) *FontFamily
func (*FontFamily) Dispose ¶
func (fm *FontFamily) Dispose()
type GdiplusStartupInput ¶
type GdiplusStartupOutput ¶
type GpBrushType ¶
type GpBrushType int32
Enum types
const ( BrushTypeSolidColor GpBrushType = iota BrushTypeHatchFill BrushTypeTextureFill BrushTypePathGradient BrushTypeLinearGradient )
BrushType
type GpCustomLineCap ¶
type GpCustomLineCap struct{}
type GpDashStyle ¶
type GpDashStyle int32
const ( DashStyleSolid GpDashStyle = iota DashStyleDash DashStyleDot DashStyleDashDot DashStyleDashDotDot DashStyleCustom )
DashStyle
type GpFontCollection ¶
type GpFontCollection struct{}
type GpFontFamily ¶
type GpFontFamily struct{}
type GpGraphics ¶
type GpGraphics struct{}
type GpLineJoin ¶
type GpLineJoin int32
const ( LineJoinMiter GpLineJoin = iota LineJoinBevel LineJoinRound LineJoinMiterClipped )
LineJoin
type GpMatrixOrder ¶
type GpMatrixOrder int32
const ( MatrixOrderPrepend GpMatrixOrder = iota MatrixOrderAppend )
MatrixOrder
type GpPenAlignment ¶
type GpPenAlignment int32
const ( PenAlignmentCenter GpPenAlignment = iota PenAlignmentInset )
PenAlignment
type GpSolidFill ¶
type GpSolidFill struct{ GpBrush }
type GpStatus ¶
type GpStatus int32
const ( Ok GpStatus = 0 GenericError GpStatus = 1 InvalidParameter GpStatus = 2 OutOfMemory GpStatus = 3 ObjectBusy GpStatus = 4 InsufficientBuffer GpStatus = 5 NotImplemented GpStatus = 6 Win32Error GpStatus = 7 WrongState GpStatus = 8 Aborted GpStatus = 9 FileNotFound GpStatus = 10 ValueOverflow GpStatus = 11 AccessDenied GpStatus = 12 UnknownImageFormat GpStatus = 13 FontFamilyNotFound GpStatus = 14 FontStyleNotFound GpStatus = 15 NotTrueTypeFont GpStatus = 16 UnsupportedGdiplusVersion GpStatus = 17 GdiplusNotInitialized GpStatus = 18 PropertyNotFound GpStatus = 19 PropertyNotSupported GpStatus = 20 ProfileNotFound GpStatus = 21 )
Status
func GdipAddPathArc ¶
func GdipAddPathArcI ¶
func GdipAddPathLine ¶
func GdipAddPathLineI ¶
func GdipCloneBrush ¶
func GdipClonePen ¶
func GdipClosePathFigure ¶
func GdipClosePathFigures ¶
func GdipCreateBitmapFromScan0 ¶
func GdipCreateBitmapFromScan0(width, height, stride int32, format PixelFormat, scan0 *byte, bitmap **GpBitmap) GpStatus
func GdipCreateFont ¶
func GdipCreateFontFamilyFromName ¶
func GdipCreateFontFamilyFromName(name *uint16, fontCollection *GpFontCollection, fontFamily **GpFontFamily) GpStatus
func GdipCreateFromHDC2 ¶
func GdipCreateFromHDC2(hdc HDC, hDevice HANDLE, graphics **GpGraphics) GpStatus
func GdipCreateFromHWND ¶
func GdipCreateFromHWND(hwnd HWND, graphics **GpGraphics) GpStatus
func GdipCreateFromHWNDICM ¶
func GdipCreateFromHWNDICM(hwnd HWND, graphics **GpGraphics) GpStatus
func GdipCreatePath ¶
func GdipCreatePen1 ¶
Pen
func GdipCreatePen2 ¶
func GdipCreateSolidFill ¶
func GdipCreateSolidFill(color ARGB, brush **GpSolidFill) GpStatus
func GdipCreateStringFormat ¶
func GdipCreateStringFormat(formatAttributes int32, language uint16, format **GpStringFormat) GpStatus
func GdipDeleteBrush ¶
func GdipDeleteFont ¶
func GdipDeleteFontFamily ¶
func GdipDeleteFontFamily(fontFamily *GpFontFamily) GpStatus
func GdipDeleteGraphics ¶
func GdipDeleteGraphics(graphics *GpGraphics) GpStatus
func GdipDeletePath ¶
func GdipDeletePen ¶
func GdipDeleteStringFormat ¶
func GdipDeleteStringFormat(format *GpStringFormat) GpStatus
func GdipDisposeImage ¶
func GdipDrawArc ¶
func GdipDrawArc(graphics *GpGraphics, pen *GpPen, x, y, width, height, startAngle, sweepAngle float32) GpStatus
func GdipDrawArcI ¶
func GdipDrawArcI(graphics *GpGraphics, pen *GpPen, x, y, width, height int32, startAngle, sweepAngle float32) GpStatus
func GdipDrawBezier ¶
func GdipDrawBezier(graphics *GpGraphics, pen *GpPen, x1, y1, x2, y2, x3, y3, x4, y4 float32) GpStatus
func GdipDrawBezierI ¶
func GdipDrawBezierI(graphics *GpGraphics, pen *GpPen, x1, y1, x2, y2, x3, y3, x4, y4 int32) GpStatus
func GdipDrawEllipse ¶
func GdipDrawEllipse(graphics *GpGraphics, pen *GpPen, x, y, width, height float32) GpStatus
func GdipDrawEllipseI ¶
func GdipDrawEllipseI(graphics *GpGraphics, pen *GpPen, x, y, width, height int32) GpStatus
func GdipDrawImage ¶
func GdipDrawImage(graphics *GpGraphics, image *GpImage, x, y float32) GpStatus
func GdipDrawImageI ¶
func GdipDrawImageI(graphics *GpGraphics, image *GpImage, x, y int32) GpStatus
func GdipDrawImageRect ¶
func GdipDrawImageRect(graphics *GpGraphics, image *GpImage, x, y, width, height float32) GpStatus
func GdipDrawImageRectI ¶
func GdipDrawImageRectI(graphics *GpGraphics, image *GpImage, x, y, width, height int32) GpStatus
func GdipDrawLine ¶
func GdipDrawLine(graphics *GpGraphics, pen *GpPen, x1, y1, x2, y2 float32) GpStatus
func GdipDrawLineI ¶
func GdipDrawLineI(graphics *GpGraphics, pen *GpPen, x1, y1, x2, y2 int32) GpStatus
func GdipDrawPath ¶
func GdipDrawPath(graphics *GpGraphics, pen *GpPen, path *GpPath) GpStatus
func GdipDrawPie ¶
func GdipDrawPie(graphics *GpGraphics, pen *GpPen, x, y, width, height, startAngle, sweepAngle float32) GpStatus
func GdipDrawPieI ¶
func GdipDrawPieI(graphics *GpGraphics, pen *GpPen, x, y, width, height int32, startAngle, sweepAngle float32) GpStatus
func GdipDrawPolygon ¶
func GdipDrawPolygon(graphics *GpGraphics, pen *GpPen, points *PointF, count int32) GpStatus
func GdipDrawPolygonI ¶
func GdipDrawPolygonI(graphics *GpGraphics, pen *GpPen, points *Point, count int32) GpStatus
func GdipDrawRectangle ¶
func GdipDrawRectangle(graphics *GpGraphics, pen *GpPen, x, y, width, height float32) GpStatus
func GdipDrawRectangleI ¶
func GdipDrawRectangleI(graphics *GpGraphics, pen *GpPen, x, y, width, height int32) GpStatus
func GdipDrawString ¶
func GdipDrawString(graphics *GpGraphics, text *uint16, length int32, font *GpFont, layoutRect *RectF, stringFormat *GpStringFormat, brush *GpBrush) GpStatus
func GdipFillEllipse ¶
func GdipFillEllipse(graphics *GpGraphics, brush *GpBrush, x, y, width, height float32) GpStatus
func GdipFillEllipseI ¶
func GdipFillEllipseI(graphics *GpGraphics, brush *GpBrush, x, y, width, height int32) GpStatus
func GdipFillPath ¶
func GdipFillPath(graphics *GpGraphics, brush *GpBrush, path *GpPath) GpStatus
func GdipFillPolygon ¶
func GdipFillPolygonI ¶
func GdipFillRectangle ¶
func GdipFillRectangle(graphics *GpGraphics, brush *GpBrush, x, y, width, height float32) GpStatus
func GdipFillRectangleI ¶
func GdipFillRectangleI(graphics *GpGraphics, brush *GpBrush, x, y, width, height int32) GpStatus
func GdipGetBrushType ¶
func GdipGetBrushType(brush *GpBrush, brushType *GpBrushType) GpStatus
func GdipGetDC ¶
func GdipGetDC(graphics *GpGraphics, hdc *HDC) GpStatus
func GdipGetImageGraphicsContext ¶
func GdipGetImageGraphicsContext(image *GpImage, graphics **GpGraphics) GpStatus
func GdipGetImageHeight ¶
func GdipGetImageWidth ¶
func GdipGetPenBrushFill ¶
func GdipGetPenColor ¶
func GdipGetPenCompoundArray ¶
func GdipGetPenCompoundCount ¶
func GdipGetPenCustomEndCap ¶
func GdipGetPenCustomEndCap(pen *GpPen, customCap **GpCustomLineCap) GpStatus
func GdipGetPenCustomStartCap ¶
func GdipGetPenCustomStartCap(pen *GpPen, customCap **GpCustomLineCap) GpStatus
func GdipGetPenDashArray ¶
func GdipGetPenDashCap197819 ¶
func GdipGetPenDashCount ¶
func GdipGetPenDashOffset ¶
func GdipGetPenDashStyle ¶
func GdipGetPenDashStyle(pen *GpPen, dashStyle *GpDashStyle) GpStatus
func GdipGetPenEndCap ¶
func GdipGetPenFillType ¶
func GdipGetPenLineJoin ¶
func GdipGetPenLineJoin(pen *GpPen, lineJoin *GpLineJoin) GpStatus
func GdipGetPenMiterLimit ¶
func GdipGetPenMode ¶
func GdipGetPenMode(pen *GpPen, penMode *GpPenAlignment) GpStatus
func GdipGetPenStartCap ¶
func GdipGetPenTransform ¶
func GdipGetPenWidth ¶
func GdipGetSolidFillColor ¶
func GdipGraphicsClear ¶
func GdipGraphicsClear(graphics *GpGraphics, color ARGB) GpStatus
func GdipLoadImageFromFile ¶
func GdipMeasureCharacterRanges ¶
func GdipMeasureCharacterRanges( graphics *GpGraphics, text *uint16, length int32, font *GpFont, layoutRect *RectF, stringFormat *GpStringFormat, regionCount int32, regions **GpRegion) GpStatus
func GdipMeasureString ¶
func GdipMeasureString( graphics *GpGraphics, text *uint16, length int32, font *GpFont, layoutRect *RectF, stringFormat *GpStringFormat, boundingBox *RectF, codepointsFitted *int32, linesFilled *int32) GpStatus
func GdipMultiplyPenTransform ¶
func GdipMultiplyPenTransform(pen *GpPen, matrix *GpMatrix, order GpMatrixOrder) GpStatus
func GdipNewInstalledFontCollection ¶
func GdipNewInstalledFontCollection(fontCollection **GpFontCollection) GpStatus
func GdipReleaseDC ¶
func GdipReleaseDC(graphics *GpGraphics, hdc HDC) GpStatus
func GdipResetPenTransform ¶
func GdipRotatePenTransform ¶
func GdipRotatePenTransform(pen *GpPen, angle float32, order GpMatrixOrder) GpStatus
func GdipSaveImageToFile ¶
func GdipSaveImageToFile(image *GpBitmap, filename *uint16, clsidEncoder *ole.GUID, encoderParams *EncoderParameters) GpStatus
func GdipScalePenTransform ¶
func GdipScalePenTransform(pen *GpPen, sx, sy float32, order GpMatrixOrder) GpStatus
func GdipSetCompositingMode ¶
func GdipSetCompositingMode(graphics *GpGraphics, mode int32) GpStatus
func GdipSetCompositingQuality ¶
func GdipSetCompositingQuality(graphics *GpGraphics, quality int32) GpStatus
func GdipSetInterpolationMode ¶
func GdipSetInterpolationMode(graphics *GpGraphics, mode int32) GpStatus
func GdipSetPenBrushFill ¶
func GdipSetPenColor ¶
func GdipSetPenCompoundArray ¶
func GdipSetPenCustomEndCap ¶
func GdipSetPenCustomEndCap(pen *GpPen, customCap *GpCustomLineCap) GpStatus
func GdipSetPenCustomStartCap ¶
func GdipSetPenCustomStartCap(pen *GpPen, customCap *GpCustomLineCap) GpStatus
func GdipSetPenDashArray ¶
func GdipSetPenDashCap197819 ¶
func GdipSetPenDashOffset ¶
func GdipSetPenDashStyle ¶
func GdipSetPenDashStyle(pen *GpPen, dashStyle GpDashStyle) GpStatus
func GdipSetPenEndCap ¶
func GdipSetPenLineCap197819 ¶
func GdipSetPenLineJoin ¶
func GdipSetPenLineJoin(pen *GpPen, lineJoin GpLineJoin) GpStatus
func GdipSetPenMiterLimit ¶
func GdipSetPenMode ¶
func GdipSetPenMode(pen *GpPen, penMode GpPenAlignment) GpStatus
func GdipSetPenStartCap ¶
func GdipSetPenTransform ¶
func GdipSetPenWidth ¶
func GdipSetPixelOffsetMode ¶
func GdipSetPixelOffsetMode(graphics *GpGraphics, mode int32) GpStatus
func GdipSetRenderingOrigin ¶
func GdipSetRenderingOrigin(graphics *GpGraphics, x, y int32) GpStatus
func GdipSetSmoothingMode ¶
func GdipSetSmoothingMode(graphics *GpGraphics, mode int32) GpStatus
func GdipSetSolidFillColor ¶
func GdipSetTextRenderingHint ¶
func GdipSetTextRenderingHint(graphics *GpGraphics, hint int32) GpStatus
func GdipStringFormatGetGenericTypographic ¶
func GdipStringFormatGetGenericTypographic(format **GpStringFormat) GpStatus
func GdipTranslatePenTransform ¶
func GdipTranslatePenTransform(pen *GpPen, dx, dy float32, order GpMatrixOrder) GpStatus
func GdiplusStartup ¶
func GdiplusStartup(input *GdiplusStartupInput, output *GdiplusStartupOutput) GpStatus
type GpStringFormat ¶
type GpStringFormat struct{}
type Graphics ¶
type Graphics struct {
// contains filtered or unexported fields
}
func NewGraphicsFromBitmap ¶
func NewGraphicsFromHDC ¶
func NewGraphicsFromHDC2 ¶
func NewGraphicsFromHWND ¶
func NewGraphicsFromHWNDICM ¶
func (*Graphics) DrawBezier ¶
func (*Graphics) DrawBezierI ¶
func (*Graphics) DrawEllipse ¶
func (*Graphics) DrawEllipseI ¶
func (*Graphics) DrawImageI ¶
func (*Graphics) DrawImageRect ¶
func (*Graphics) DrawImageRectI ¶
func (*Graphics) DrawPath ¶
func (g *Graphics) DrawPath(pen *Pen, path *GraphicsPath)
func (*Graphics) DrawPolygon ¶
func (*Graphics) DrawPolygonI ¶
func (*Graphics) DrawRectangle ¶
func (*Graphics) DrawRectangleI ¶
func (*Graphics) DrawString ¶
func (*Graphics) DrawStringEx ¶
func (*Graphics) FillEllipse ¶
func (*Graphics) FillEllipseI ¶
func (*Graphics) FillPath ¶
func (g *Graphics) FillPath(brush *Brush, path *GraphicsPath)
func (*Graphics) FillPolygon ¶
func (*Graphics) FillPolygonI ¶
func (*Graphics) FillRectangle ¶
func (*Graphics) FillRectangleI ¶
func (*Graphics) MeasureCharacterRanges ¶
func (*Graphics) MeasureString ¶
func (*Graphics) MeasureStringEx ¶
func (*Graphics) SetCompositingMode ¶
func (*Graphics) SetCompositingQuality ¶
func (*Graphics) SetInterpolationMode ¶
func (*Graphics) SetPixelOffsetMode ¶
func (*Graphics) SetRenderingOrigin ¶
func (*Graphics) SetSmoothingMode ¶
func (*Graphics) SetTextRenderingHint ¶
type GraphicsPath ¶
type GraphicsPath struct {
// contains filtered or unexported fields
}
func NewPath ¶
func NewPath(fillMode int32) *GraphicsPath
func (*GraphicsPath) AddArc ¶
func (p *GraphicsPath) AddArc(x, y, width, height, startAngle, sweepAngle float32)
func (*GraphicsPath) AddArcI ¶
func (p *GraphicsPath) AddArcI(x, y, width, height int32, startAngle, sweepAngle float32)
func (*GraphicsPath) AddArcRect ¶
func (p *GraphicsPath) AddArcRect(rect *Rect, startAngle, sweepAngle float32)
func (*GraphicsPath) AddArcRectF ¶
func (p *GraphicsPath) AddArcRectF(rect *RectF, startAngle, sweepAngle float32)
func (*GraphicsPath) AddLine ¶
func (p *GraphicsPath) AddLine(x1, y1, x2, y2 float32)
func (*GraphicsPath) AddLineI ¶
func (p *GraphicsPath) AddLineI(x1, y1, x2, y2 int32)
func (*GraphicsPath) CloseAllFigures ¶
func (p *GraphicsPath) CloseAllFigures()
func (*GraphicsPath) CloseFigure ¶
func (p *GraphicsPath) CloseFigure()
func (*GraphicsPath) Dispose ¶
func (p *GraphicsPath) Dispose()
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func NewImageFromFile ¶
type LineJoin ¶
type LineJoin GpLineJoin
type MatrixOrder ¶
type MatrixOrder GpMatrixOrder
type Pen ¶
type Pen struct {
// contains filtered or unexported fields
}
func NewPenFromBrush ¶
func (*Pen) GetCompoundArray ¶
func (*Pen) GetCompoundCount ¶
func (*Pen) GetCustomEndCap ¶
func (p *Pen) GetCustomEndCap() (customCap *GpCustomLineCap)
func (*Pen) GetCustomStartCap ¶
func (p *Pen) GetCustomStartCap() (customCap *GpCustomLineCap)
func (*Pen) GetDashArray ¶
func (*Pen) GetDashCap ¶
func (*Pen) GetDashCount ¶
func (*Pen) GetDashOffset ¶
func (*Pen) GetDashStyle ¶
func (*Pen) GetLineJoin ¶
func (*Pen) GetMiterLimit ¶
func (*Pen) GetMode ¶
func (p *Pen) GetMode() (penMode PenAlignment)
func (*Pen) GetPenType ¶
func (*Pen) GetStartCap ¶
func (*Pen) GetTransform ¶
func (*Pen) MultiplyTransform ¶
func (p *Pen) MultiplyTransform(matrix *GpMatrix, order MatrixOrder)
func (*Pen) ResetTransform ¶
func (p *Pen) ResetTransform()
func (*Pen) RotateTransform ¶
func (p *Pen) RotateTransform(angle float32, order MatrixOrder)
func (*Pen) ScaleTransform ¶
func (p *Pen) ScaleTransform(sx, sy float32, order MatrixOrder)
func (*Pen) SetCompoundArray ¶
func (*Pen) SetCustomEndCap ¶
func (p *Pen) SetCustomEndCap(customCap *GpCustomLineCap)
func (*Pen) SetCustomStartCap ¶
func (p *Pen) SetCustomStartCap(customCap *GpCustomLineCap)
func (*Pen) SetDashArray ¶
func (*Pen) SetDashCap ¶
func (*Pen) SetDashOffset ¶
func (*Pen) SetDashStyle ¶
func (*Pen) SetLineCap ¶
func (*Pen) SetLineJoin ¶
func (*Pen) SetMiterLimit ¶
func (*Pen) SetMode ¶
func (p *Pen) SetMode(penMode PenAlignment)
func (*Pen) SetStartCap ¶
func (*Pen) SetTransform ¶
func (*Pen) TranslateTransform ¶
func (p *Pen) TranslateTransform(dx, dy float32, order MatrixOrder)
type PenAlignment ¶
type PenAlignment GpPenAlignment
type PixelFormat ¶
type PixelFormat int32
type SolidBrush ¶
type SolidBrush struct {
Brush
}
func NewSolidBrush ¶
func NewSolidBrush(color *Color) *SolidBrush
func (*SolidBrush) AsBrush ¶
func (b *SolidBrush) AsBrush() *Brush
func (*SolidBrush) GetColor ¶
func (b *SolidBrush) GetColor() (color Color)
func (*SolidBrush) SetColor ¶
func (b *SolidBrush) SetColor(color *Color)
type StringFormat ¶
type StringFormat struct {
// contains filtered or unexported fields
}
func NewGenericTypographicStringFormat ¶
func NewGenericTypographicStringFormat() *StringFormat
func NewStringFormat ¶
func NewStringFormat() *StringFormat
func (*StringFormat) Dispose ¶
func (format *StringFormat) Dispose()
Click to show internal directories.
Click to hide internal directories.