gdiplus

package module
v0.0.0-...-228a132 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

README

About go-gdiplus

This is a GDI+ wrapper package for the Go Programming Language. It includes the flat api and a lightweight object-oriented version around the flat api

Installation

Simply run

go get -u github.com/shahfarhadreza/go-gdiplus

Using

Simply import the package this way to use it

import "github.com/shahfarhadreza/go-gdiplus"

Documentation

Index

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 ARGB

type ARGB uint32

func MakeARGB

func MakeARGB(a, r, g, b byte) ARGB

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 NewBitmapFromFile(fileName string) *Bitmap

func NewBitmapFromHBITMAP

func NewBitmapFromHBITMAP(hbitmap HBITMAP) *Bitmap

func (*Bitmap) Dispose

func (bitmap *Bitmap) Dispose()

type Brush

type Brush struct {
	// contains filtered or unexported fields
}

func (*Brush) Clone

func (b *Brush) Clone() *Brush

func (*Brush) Dispose

func (b *Brush) Dispose()

func (*Brush) GetBrushType

func (b *Brush) GetBrushType() (brushType BrushType)

type BrushType

type BrushType GpBrushType

type Color

type Color struct {
	Argb ARGB
}

func NewColor

func NewColor(r, g, b, a byte) *Color

func (*Color) GetA

func (c *Color) GetA() byte

func (*Color) GetAlpha

func (c *Color) GetAlpha() byte

func (*Color) GetB

func (c *Color) GetB() byte

func (*Color) GetBlue

func (c *Color) GetBlue() byte

func (*Color) GetG

func (c *Color) GetG() byte

func (*Color) GetGreen

func (c *Color) GetGreen() byte

func (*Color) GetR

func (c *Color) GetR() byte

func (*Color) GetRed

func (c *Color) GetRed() byte

func (*Color) GetValue

func (c *Color) GetValue() ARGB

type DashCap

type DashCap GpDashCap

type DashStyle

type DashStyle GpDashStyle

type EncoderParameter

type EncoderParameter struct {
	Guid           ole.GUID
	NumberOfValues uint32
	TypeAPI        uint32
	Value          uintptr
}

type EncoderParameters

type EncoderParameters struct {
	Count     uint32
	Parameter [1]EncoderParameter
}

type Font

type Font struct {
	// contains filtered or unexported fields
}

func NewFont

func NewFont(familyName string, emSize float32, style int32, unit GpUnit, fontCollection *FontCollection) *Font

func (*Font) Dispose

func (f *Font) Dispose()

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 GdiplusStartupInput struct {
	GdiplusVersion           uint32
	DebugEventCallback       uintptr
	SuppressBackgroundThread int32
	SuppressExternalCodecs   int32
}

type GdiplusStartupOutput

type GdiplusStartupOutput struct {
	NotificationHook   uintptr
	NotificationUnhook uintptr
}

type GpBitmap

type GpBitmap GpImage

type GpBrush

type GpBrush struct{}

type GpBrushType

type GpBrushType int32

Enum types

const (
	BrushTypeSolidColor GpBrushType = iota
	BrushTypeHatchFill
	BrushTypeTextureFill
	BrushTypePathGradient
	BrushTypeLinearGradient
)

BrushType

type GpCustomLineCap

type GpCustomLineCap struct{}

type GpDashCap

type GpDashCap int32
const (
	DashCapFlat GpDashCap = iota
	DashCapRound
	DashCapTriangle
)

DashCap

type GpDashStyle

type GpDashStyle int32
const (
	DashStyleSolid GpDashStyle = iota
	DashStyleDash
	DashStyleDot
	DashStyleDashDot
	DashStyleDashDotDot
	DashStyleCustom
)

DashStyle

type GpFont

type GpFont struct{}

type GpFontCollection

type GpFontCollection struct{}

type GpFontFamily

type GpFontFamily struct{}

type GpGraphics

type GpGraphics struct{}

type GpImage

type GpImage struct{}

type GpLineCap

type GpLineCap int32
const (
	LineCapFlat GpLineCap = iota
	LineCapSquare
	LineCapRound
	LineCapTriangle
	LineCapNoAnchor
	LineCapSquareAnchor
	LineCapRoundAnchor
	LineCapDiamondAnchor
	LineCapArrowAnchor
	LineCapCustom
	LineCapAnchorMask
)

LineCap

type GpLineJoin

type GpLineJoin int32
const (
	LineJoinMiter GpLineJoin = iota
	LineJoinBevel
	LineJoinRound
	LineJoinMiterClipped
)

LineJoin

type GpMatrix

type GpMatrix struct{}

type GpMatrixOrder

type GpMatrixOrder int32
const (
	MatrixOrderPrepend GpMatrixOrder = iota
	MatrixOrderAppend
)

MatrixOrder

type GpPath

type GpPath struct{}

type GpPen

type GpPen struct{}

type GpPenAlignment

type GpPenAlignment int32
const (
	PenAlignmentCenter GpPenAlignment = iota
	PenAlignmentInset
)

PenAlignment

type GpPenType

type GpPenType int32
const (
	PenTypeSolidColor GpPenType = iota
	PenTypeHatchFill
	PenTypeTextureFill
	PenTypePathGradient
	PenTypeLinearGradient
	PenTypeUnknown
)

PenType

type GpRegion

type GpRegion struct{}

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 GdipAddPathArc(path *GpPath, x, y, width, height, startAngle, sweepAngle float32) GpStatus

func GdipAddPathArcI

func GdipAddPathArcI(path *GpPath, x, y, width, height int32, startAngle, sweepAngle float32) GpStatus

func GdipAddPathLine

func GdipAddPathLine(path *GpPath, x1, y1, x2, y2 float32) GpStatus

func GdipAddPathLineI

func GdipAddPathLineI(path *GpPath, x1, y1, x2, y2 int32) GpStatus

func GdipCloneBrush

func GdipCloneBrush(brush *GpBrush, clone **GpBrush) GpStatus

func GdipClonePen

func GdipClonePen(pen *GpPen, clonepen **GpPen) GpStatus

func GdipClosePathFigure

func GdipClosePathFigure(path *GpPath) GpStatus

func GdipClosePathFigures

func GdipClosePathFigures(path *GpPath) GpStatus

func GdipCreateBitmapFromFile

func GdipCreateBitmapFromFile(filename *uint16, bitmap **GpBitmap) GpStatus

func GdipCreateBitmapFromHBITMAP

func GdipCreateBitmapFromHBITMAP(hbm HBITMAP, hpal HPALETTE, bitmap **GpBitmap) GpStatus

func GdipCreateBitmapFromScan0

func GdipCreateBitmapFromScan0(width, height, stride int32, format PixelFormat, scan0 *byte, bitmap **GpBitmap) GpStatus

func GdipCreateFont

func GdipCreateFont(fontFamily *GpFontFamily, emSize float32, style int32, unit GpUnit, font **GpFont) GpStatus

func GdipCreateFontFamilyFromName

func GdipCreateFontFamilyFromName(name *uint16, fontCollection *GpFontCollection, fontFamily **GpFontFamily) GpStatus

func GdipCreateFontFromDC

func GdipCreateFontFromDC(hdc HDC, font **GpFont) GpStatus

Font

func GdipCreateFromHDC

func GdipCreateFromHDC(hdc HDC, graphics **GpGraphics) GpStatus

Graphics

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 GdipCreateHBITMAPFromBitmap

func GdipCreateHBITMAPFromBitmap(bitmap *GpBitmap, hbmReturn *HBITMAP, background ARGB) GpStatus

func GdipCreatePath

func GdipCreatePath(brushMode int32, path **GpPath) GpStatus

func GdipCreatePen1

func GdipCreatePen1(color ARGB, width float32, unit GpUnit, pen **GpPen) GpStatus

Pen

func GdipCreatePen2

func GdipCreatePen2(brush *GpBrush, width float32, unit GpUnit, pen **GpPen) GpStatus

func GdipCreateSolidFill

func GdipCreateSolidFill(color ARGB, brush **GpSolidFill) GpStatus

func GdipCreateStringFormat

func GdipCreateStringFormat(formatAttributes int32, language uint16, format **GpStringFormat) GpStatus

func GdipDeleteBrush

func GdipDeleteBrush(brush *GpBrush) GpStatus

func GdipDeleteFont

func GdipDeleteFont(font *GpFont) GpStatus

func GdipDeleteFontFamily

func GdipDeleteFontFamily(fontFamily *GpFontFamily) GpStatus

func GdipDeleteGraphics

func GdipDeleteGraphics(graphics *GpGraphics) GpStatus

func GdipDeletePath

func GdipDeletePath(path *GpPath) GpStatus

func GdipDeletePen

func GdipDeletePen(pen *GpPen) GpStatus

func GdipDeleteStringFormat

func GdipDeleteStringFormat(format *GpStringFormat) GpStatus

func GdipDisposeImage

func GdipDisposeImage(image *GpImage) GpStatus

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 GdipFillPolygon(graphics *GpGraphics, brush *GpBrush, points *PointF, count int32, fillMode int32) GpStatus

func GdipFillPolygonI

func GdipFillPolygonI(graphics *GpGraphics, brush *GpBrush, points *Point, count int32, fillMode int32) GpStatus

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 GdipGetImageHeight(image *GpImage, height *uint32) GpStatus

func GdipGetImageWidth

func GdipGetImageWidth(image *GpImage, width *uint32) GpStatus

func GdipGetPenBrushFill

func GdipGetPenBrushFill(pen *GpPen, brush **GpBrush) GpStatus

func GdipGetPenColor

func GdipGetPenColor(pen *GpPen, argb *ARGB) GpStatus

func GdipGetPenCompoundArray

func GdipGetPenCompoundArray(pen *GpPen, dash *float32, count int32) GpStatus

func GdipGetPenCompoundCount

func GdipGetPenCompoundCount(pen *GpPen, count *int32) GpStatus

func GdipGetPenCustomEndCap

func GdipGetPenCustomEndCap(pen *GpPen, customCap **GpCustomLineCap) GpStatus

func GdipGetPenCustomStartCap

func GdipGetPenCustomStartCap(pen *GpPen, customCap **GpCustomLineCap) GpStatus

func GdipGetPenDashArray

func GdipGetPenDashArray(pen *GpPen, dash *float32, count int32) GpStatus

func GdipGetPenDashCap197819

func GdipGetPenDashCap197819(pen *GpPen, dashCap *GpDashCap) GpStatus

func GdipGetPenDashCount

func GdipGetPenDashCount(pen *GpPen, count *int32) GpStatus

func GdipGetPenDashOffset

func GdipGetPenDashOffset(pen *GpPen, offset *float32) GpStatus

func GdipGetPenDashStyle

func GdipGetPenDashStyle(pen *GpPen, dashStyle *GpDashStyle) GpStatus

func GdipGetPenEndCap

func GdipGetPenEndCap(pen *GpPen, endCap *GpLineCap) GpStatus

func GdipGetPenFillType

func GdipGetPenFillType(pen *GpPen, penType *GpPenType) GpStatus

func GdipGetPenLineJoin

func GdipGetPenLineJoin(pen *GpPen, lineJoin *GpLineJoin) GpStatus

func GdipGetPenMiterLimit

func GdipGetPenMiterLimit(pen *GpPen, miterLimit *float32) GpStatus

func GdipGetPenMode

func GdipGetPenMode(pen *GpPen, penMode *GpPenAlignment) GpStatus

func GdipGetPenStartCap

func GdipGetPenStartCap(pen *GpPen, startCap *GpLineCap) GpStatus

func GdipGetPenTransform

func GdipGetPenTransform(pen *GpPen, matrix *GpMatrix) GpStatus

func GdipGetPenWidth

func GdipGetPenWidth(pen *GpPen, width *float32) GpStatus

func GdipGetSolidFillColor

func GdipGetSolidFillColor(brush *GpBrush, color *ARGB) GpStatus

func GdipGraphicsClear

func GdipGraphicsClear(graphics *GpGraphics, color ARGB) GpStatus

func GdipLoadImageFromFile

func GdipLoadImageFromFile(filename *uint16, image **GpImage) GpStatus

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 GdipResetPenTransform(pen *GpPen) GpStatus

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 GdipSetPenBrushFill(pen *GpPen, brush *GpBrush) GpStatus

func GdipSetPenColor

func GdipSetPenColor(pen *GpPen, argb ARGB) GpStatus

func GdipSetPenCompoundArray

func GdipSetPenCompoundArray(pen *GpPen, dash *float32, count int32) GpStatus

func GdipSetPenCustomEndCap

func GdipSetPenCustomEndCap(pen *GpPen, customCap *GpCustomLineCap) GpStatus

func GdipSetPenCustomStartCap

func GdipSetPenCustomStartCap(pen *GpPen, customCap *GpCustomLineCap) GpStatus

func GdipSetPenDashArray

func GdipSetPenDashArray(pen *GpPen, dash *float32, count int32) GpStatus

func GdipSetPenDashCap197819

func GdipSetPenDashCap197819(pen *GpPen, dashCap GpDashCap) GpStatus

func GdipSetPenDashOffset

func GdipSetPenDashOffset(pen *GpPen, offset float32) GpStatus

func GdipSetPenDashStyle

func GdipSetPenDashStyle(pen *GpPen, dashStyle GpDashStyle) GpStatus

func GdipSetPenEndCap

func GdipSetPenEndCap(pen *GpPen, endCap GpLineCap) GpStatus

func GdipSetPenLineCap197819

func GdipSetPenLineCap197819(pen *GpPen, startCap, endCap GpLineCap, dashCap GpDashCap) GpStatus

func GdipSetPenLineJoin

func GdipSetPenLineJoin(pen *GpPen, lineJoin GpLineJoin) GpStatus

func GdipSetPenMiterLimit

func GdipSetPenMiterLimit(pen *GpPen, miterLimit float32) GpStatus

func GdipSetPenMode

func GdipSetPenMode(pen *GpPen, penMode GpPenAlignment) GpStatus

func GdipSetPenStartCap

func GdipSetPenStartCap(pen *GpPen, startCap GpLineCap) GpStatus

func GdipSetPenTransform

func GdipSetPenTransform(pen *GpPen, matrix *GpMatrix) GpStatus

func GdipSetPenWidth

func GdipSetPenWidth(pen *GpPen, width float32) GpStatus

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 GdipSetSolidFillColor(brush *GpBrush, color ARGB) GpStatus

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

func (GpStatus) String

func (s GpStatus) String() string

type GpStringFormat

type GpStringFormat struct{}

type GpUnit

type GpUnit int32

type Graphics

type Graphics struct {
	// contains filtered or unexported fields
}

func NewGraphicsFromBitmap

func NewGraphicsFromBitmap(bitmap *Bitmap) *Graphics

func NewGraphicsFromHDC

func NewGraphicsFromHDC(hdc HDC) *Graphics

func NewGraphicsFromHDC2

func NewGraphicsFromHDC2(hdc HDC, hDevice HANDLE) *Graphics

func NewGraphicsFromHWND

func NewGraphicsFromHWND(hwnd HWND) *Graphics

func NewGraphicsFromHWNDICM

func NewGraphicsFromHWNDICM(hwnd HWND) *Graphics

func (*Graphics) Clear

func (g *Graphics) Clear(color *Color)

func (*Graphics) Dispose

func (g *Graphics) Dispose()

func (*Graphics) DrawArc

func (g *Graphics) DrawArc(pen *Pen, x, y, width, height, startAngle, sweepAngle float32)

func (*Graphics) DrawArcI

func (g *Graphics) DrawArcI(pen *Pen, x, y, width, height int32, startAngle, sweepAngle float32)

func (*Graphics) DrawBezier

func (g *Graphics) DrawBezier(pen *Pen, x1, y1, x2, y2, x3, y3, x4, y4 float32)

func (*Graphics) DrawBezierI

func (g *Graphics) DrawBezierI(pen *Pen, x1, y1, x2, y2, x3, y3, x4, y4 int32)

func (*Graphics) DrawEllipse

func (g *Graphics) DrawEllipse(pen *Pen, x, y, width, height float32)

func (*Graphics) DrawEllipseI

func (g *Graphics) DrawEllipseI(pen *Pen, x, y, width, height int32)

func (*Graphics) DrawImage

func (g *Graphics) DrawImage(image *Image, x, y float32)

func (*Graphics) DrawImageI

func (g *Graphics) DrawImageI(image *Image, x, y int32)

func (*Graphics) DrawImageRect

func (g *Graphics) DrawImageRect(image *Image, x, y, width, height float32)

func (*Graphics) DrawImageRectI

func (g *Graphics) DrawImageRectI(image *Image, x, y, width, height int32)

func (*Graphics) DrawLine

func (g *Graphics) DrawLine(pen *Pen, x1, y1, x2, y2 float32)

func (*Graphics) DrawLineI

func (g *Graphics) DrawLineI(pen *Pen, x1, y1, x2, y2 int32)

func (*Graphics) DrawPath

func (g *Graphics) DrawPath(pen *Pen, path *GraphicsPath)

func (*Graphics) DrawPie

func (g *Graphics) DrawPie(pen *Pen, x, y, width, height, startAngle, sweepAngle float32)

func (*Graphics) DrawPieI

func (g *Graphics) DrawPieI(pen *Pen, x, y, width, height int32, startAngle, sweepAngle float32)

func (*Graphics) DrawPolygon

func (g *Graphics) DrawPolygon(pen *Pen, points []PointF)

func (*Graphics) DrawPolygonI

func (g *Graphics) DrawPolygonI(pen *Pen, points []Point)

func (*Graphics) DrawRectangle

func (g *Graphics) DrawRectangle(pen *Pen, x, y, width, height float32)

func (*Graphics) DrawRectangleI

func (g *Graphics) DrawRectangleI(pen *Pen, x, y, width, height int32)

func (*Graphics) DrawString

func (g *Graphics) DrawString(text string, font *Font, origin *PointF, brush *Brush)

func (*Graphics) DrawStringEx

func (g *Graphics) DrawStringEx(text string, font *Font, rect *RectF, format *StringFormat, brush *Brush)

func (*Graphics) FillEllipse

func (g *Graphics) FillEllipse(brush *Brush, x, y, width, height float32)

func (*Graphics) FillEllipseI

func (g *Graphics) FillEllipseI(brush *Brush, x, y, width, height int32)

func (*Graphics) FillPath

func (g *Graphics) FillPath(brush *Brush, path *GraphicsPath)

func (*Graphics) FillPolygon

func (g *Graphics) FillPolygon(brush *Brush, points []PointF, fillMode int32)

func (*Graphics) FillPolygonI

func (g *Graphics) FillPolygonI(brush *Brush, points []Point, fillMode int32)

func (*Graphics) FillRectangle

func (g *Graphics) FillRectangle(brush *Brush, x, y, width, height float32)

func (*Graphics) FillRectangleI

func (g *Graphics) FillRectangleI(brush *Brush, x, y, width, height int32)

func (*Graphics) GetDC

func (g *Graphics) GetDC() (hdc HDC)

func (*Graphics) MeasureCharacterRanges

func (g *Graphics) MeasureCharacterRanges(text string, font *Font,
	layoutRect *RectF,
	stringFormat *StringFormat, regionCount int32,
	regions **GpRegion)

func (*Graphics) MeasureString

func (g *Graphics) MeasureString(text string, font *Font, layoutRect *RectF,
	stringFormat *StringFormat, boundingBox *RectF)

func (*Graphics) MeasureStringEx

func (g *Graphics) MeasureStringEx(text string, font *Font, layoutRect *RectF,
	stringFormat *StringFormat, boundingBox *RectF,
	codepointsFitted *int32, linesFilled *int32)

func (*Graphics) ReleaseDC

func (g *Graphics) ReleaseDC(hdc HDC)

func (*Graphics) SetCompositingMode

func (g *Graphics) SetCompositingMode(mode int32)

func (*Graphics) SetCompositingQuality

func (g *Graphics) SetCompositingQuality(quality int32)

func (*Graphics) SetInterpolationMode

func (g *Graphics) SetInterpolationMode(mode int32)

func (*Graphics) SetPixelOffsetMode

func (g *Graphics) SetPixelOffsetMode(mode int32)

func (*Graphics) SetRenderingOrigin

func (g *Graphics) SetRenderingOrigin(x, y int32)

func (*Graphics) SetSmoothingMode

func (g *Graphics) SetSmoothingMode(mode int32)

func (*Graphics) SetTextRenderingHint

func (g *Graphics) SetTextRenderingHint(hint int32)

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 HANDLE

type HANDLE uintptr

Windows Types

type HBITMAP

type HBITMAP uintptr

type HDC

type HDC uintptr

type HPALETTE

type HPALETTE uintptr

type HWND

type HWND uintptr

type Image

type Image struct {
	// contains filtered or unexported fields
}

func NewImageFromFile

func NewImageFromFile(fileName string) *Image

func (*Image) Dispose

func (image *Image) Dispose()

func (*Image) GetHeight

func (image *Image) GetHeight() (height uint32)

func (*Image) GetWidth

func (image *Image) GetWidth() (width uint32)

type LineCap

type LineCap GpLineCap

type LineJoin

type LineJoin GpLineJoin

type MatrixOrder

type MatrixOrder GpMatrixOrder

type Pen

type Pen struct {
	// contains filtered or unexported fields
}

func NewPen

func NewPen(color *Color, width float32) *Pen

func NewPenFromBrush

func NewPenFromBrush(brush *Brush, width float32) *Pen

func (*Pen) Clone

func (p *Pen) Clone() *Pen

func (*Pen) Dispose

func (p *Pen) Dispose()

func (*Pen) GetBrush

func (p *Pen) GetBrush() *Brush

func (*Pen) GetColor

func (p *Pen) GetColor() (color Color)

func (*Pen) GetCompoundArray

func (p *Pen) GetCompoundArray(dash *float32, count int32)

func (*Pen) GetCompoundCount

func (p *Pen) GetCompoundCount() (count int32)

func (*Pen) GetCustomEndCap

func (p *Pen) GetCustomEndCap() (customCap *GpCustomLineCap)

func (*Pen) GetCustomStartCap

func (p *Pen) GetCustomStartCap() (customCap *GpCustomLineCap)

func (*Pen) GetDashArray

func (p *Pen) GetDashArray(dash *float32, count int32)

func (*Pen) GetDashCap

func (p *Pen) GetDashCap() (dashCap DashCap)

func (*Pen) GetDashCount

func (p *Pen) GetDashCount() (count int32)

func (*Pen) GetDashOffset

func (p *Pen) GetDashOffset() (offset float32)

func (*Pen) GetDashStyle

func (p *Pen) GetDashStyle() (dashStyle DashStyle)

func (*Pen) GetEndCap

func (p *Pen) GetEndCap() (endCap LineCap)

func (*Pen) GetLineJoin

func (p *Pen) GetLineJoin() (lineJoin LineJoin)

func (*Pen) GetMiterLimit

func (p *Pen) GetMiterLimit() (miterLimit float32)

func (*Pen) GetMode

func (p *Pen) GetMode() (penMode PenAlignment)

func (*Pen) GetPenType

func (p *Pen) GetPenType() (penType PenType)

func (*Pen) GetStartCap

func (p *Pen) GetStartCap() (startCap LineCap)

func (*Pen) GetTransform

func (p *Pen) GetTransform(matrix *GpMatrix)

func (*Pen) GetWidth

func (p *Pen) GetWidth() (width float32)

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) SetBrush

func (p *Pen) SetBrush(brush *Brush)

func (*Pen) SetColor

func (p *Pen) SetColor(color *Color)

func (*Pen) SetCompoundArray

func (p *Pen) SetCompoundArray(dash []float32)

func (*Pen) SetCustomEndCap

func (p *Pen) SetCustomEndCap(customCap *GpCustomLineCap)

func (*Pen) SetCustomStartCap

func (p *Pen) SetCustomStartCap(customCap *GpCustomLineCap)

func (*Pen) SetDashArray

func (p *Pen) SetDashArray(dash []float32)

func (*Pen) SetDashCap

func (p *Pen) SetDashCap(dashCap DashCap)

func (*Pen) SetDashOffset

func (p *Pen) SetDashOffset(offset float32)

func (*Pen) SetDashStyle

func (p *Pen) SetDashStyle(dashStyle DashStyle)

func (*Pen) SetEndCap

func (p *Pen) SetEndCap(endCap LineCap)

func (*Pen) SetLineCap

func (p *Pen) SetLineCap(startCap, endCap LineCap, dashCap DashCap)

func (*Pen) SetLineJoin

func (p *Pen) SetLineJoin(lineJoin LineJoin)

func (*Pen) SetMiterLimit

func (p *Pen) SetMiterLimit(miterLimit float32)

func (*Pen) SetMode

func (p *Pen) SetMode(penMode PenAlignment)

func (*Pen) SetStartCap

func (p *Pen) SetStartCap(startCap LineCap)

func (*Pen) SetTransform

func (p *Pen) SetTransform(matrix *GpMatrix)

func (*Pen) SetWidth

func (p *Pen) SetWidth(width float32)

func (*Pen) TranslateTransform

func (p *Pen) TranslateTransform(dx, dy float32, order MatrixOrder)

type PenAlignment

type PenAlignment GpPenAlignment

type PenType

type PenType GpPenType

type PixelFormat

type PixelFormat int32

type Point

type Point struct {
	X int32
	Y int32
}

type PointF

type PointF struct {
	X float32
	Y float32
}

type Rect

type Rect struct {
	X      int32
	Y      int32
	Width  int32
	Height int32
}

func NewRect

func NewRect(x, y, width, height int32) *Rect

func (*Rect) Bottom

func (rect *Rect) Bottom() int32

func (*Rect) Left

func (rect *Rect) Left() int32

func (*Rect) Right

func (rect *Rect) Right() int32

func (*Rect) Top

func (rect *Rect) Top() int32

type RectF

type RectF struct {
	X      float32
	Y      float32
	Width  float32
	Height float32
}

func NewRectF

func NewRectF(x, y, width, height float32) *RectF

func (*RectF) Bottom

func (rect *RectF) Bottom() float32

func (*RectF) Left

func (rect *RectF) Left() float32

func (*RectF) Right

func (rect *RectF) Right() float32

func (*RectF) Top

func (rect *RectF) Top() float32

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL