svg

package
v0.0.0-...-48d22b3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package svg 封装了对SVG矢量图形的相关操作.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Svg

type Svg struct {
	objectbase.ObjectBase
}

SVG矢量图形.

func NewSvg_LoadFile

func NewSvg_LoadFile(pFileName string) *Svg

SVG_加载从文件, 返回Svg对象.

pFileName: 文件名.

func NewSvg_LoadRes

func NewSvg_LoadRes(id int, pType string, hModule int) *Svg

SVG_加载从资源, 返回Svg对象.

id: 资源ID.

pType: 资源类型.在rc资源文件中.

hModule: 从指定模块加载.

func NewSvg_LoadString

func NewSvg_LoadString(pString string) *Svg

SVG_加载从字符串, 返回Svg对象.

pString: 字符串.

func NewSvg_LoadStringUtf8

func NewSvg_LoadStringUtf8(pString string) *Svg

SVG_加载从字符串UTF8.

pString: 字符串.

func NewSvg_LoadStringW

func NewSvg_LoadStringW(pString string) *Svg

SVG_加载从字符串W.

pString: 字符串.

func NewSvg_LoadZip

func NewSvg_LoadZip(pZipFileName, pFileName, pPassword string) *Svg

SVG_加载从ZIP, 返回Svg对象.

pZipFileName: zip文件名.

pFileName: svg文件名.

pPassword: zip密码.

func (*Svg) AddRef

func (s *Svg) AddRef() int

SVG_增加引用计数.

func (*Svg) Destroy

func (s *Svg) Destroy() int

SVG_销毁.

func (*Svg) EnableAutoDestroy

func (s *Svg) EnableAutoDestroy(bEnable bool) int

SVG_启用自动销毁.

bEnable: 是否自动销毁.

func (*Svg) GetAlpha

func (s *Svg) GetAlpha() int

SVG_取透明度, 返回透明度.

func (*Svg) GetHeight

func (s *Svg) GetHeight() int

SVG_取高度.

func (*Svg) GetPosition

func (s *Svg) GetPosition(pX, pY *int) int

SVG_取偏移.

pX: x轴偏移.

pY: y轴偏移.

func (*Svg) GetPositionF

func (s *Svg) GetPositionF(pX, pY *float32) int

SVG_取偏移F.

pX: x轴偏移.

pY: y轴偏移.

func (*Svg) GetRefCount

func (s *Svg) GetRefCount() int

SVG_取引用计数.

func (*Svg) GetRotate

func (s *Svg) GetRotate(pAngle *float32, pX *float32, pY *float32, pbOffset *bool) int

SVG_取旋转.

pAngle: 返回角度.

pX: 返回 旋转中心点X.

pY: 返回 旋转中心点Y.

pbOffset: 返回TRUE: 旋转中心点相对于自身中心偏移, FALSE:使用绝对坐标.

func (*Svg) GetRotateAngle

func (s *Svg) GetRotateAngle() float32

SVG_取旋转角度, 返回旋转角度.

func (*Svg) GetSize

func (s *Svg) GetSize(pWidth, pHeight *int) int

SVG_取大小.

pWidth: 接收返回宽度.

pHeight: 接收返回高度.

func (*Svg) GetUserFillColor

func (s *Svg) GetUserFillColor(pColor *int) bool

SVG_取用户填充颜色.

pColor: 返回颜色值, AGBR颜色.

func (*Svg) GetUserStrokeColor

func (s *Svg) GetUserStrokeColor(pColor *int, pStrokeWidth *float32) bool

SVG_取用户笔触颜色.

pColor: 返回颜色值, AGBR颜色.

pStrokeWidth: .

func (*Svg) GetViewBox

func (s *Svg) GetViewBox(pViewBox *xc.RECT) int

SVG_取视图框.

pViewBox: 接收返回视图框.

func (*Svg) GetWidth

func (s *Svg) GetWidth() int

SVG_取宽度.

func (*Svg) Release

func (s *Svg) Release() int

SVG_释放引用计数.

func (*Svg) SetAlpha

func (s *Svg) SetAlpha(alpha byte) int

SVG_置透明度.

alpha: 透明度.

func (*Svg) SetPosition

func (s *Svg) SetPosition(x, y int) int

SVG_置偏移.

x: x轴偏移.

y: y轴偏移.

func (*Svg) SetPositionF

func (s *Svg) SetPositionF(x, y float32) int

SVG_置偏移F.

x: x轴偏移.

y: y轴偏移.

func (*Svg) SetRotate

func (s *Svg) SetRotate(angle float32, x float32, y float32, bOffset bool) int

SVG_置旋转.

angle: 角度.

x: 旋转中心点X.

y: 旋转中心点Y.

bOffset: TRUE: 旋转中心点相对于自身中心偏移, FALSE:使用绝对坐标.

func (*Svg) SetRotateAngle

func (s *Svg) SetRotateAngle(angle float32) int

SVG_置旋转角度, 默认以自身中心点旋转.

angle: 转角度.

func (*Svg) SetSize

func (s *Svg) SetSize(nWidth, nHeight int) int

SVG_置大小.

nWidth: 宽度.

nHeight: 高度.

func (*Svg) SetUserFillColor

func (s *Svg) SetUserFillColor(color int, bEnable bool) int

SVG_置用户填充颜色, 用户颜色将覆盖默认样式.

color: 颜色, AGBR颜色.

bEnable: 是否有效.

func (*Svg) SetUserStrokeColor

func (s *Svg) SetUserStrokeColor(color int, strokeWidth float32, bEnable bool) int

SVG_置用户笔触颜色, 用户颜色将覆盖默认样式.

color: 颜色, AGBR颜色.

strokeWidth: 笔触宽度.

bEnable: 是否有效.

func (*Svg) Show

func (s *Svg) Show(bShow bool) int

SVG_显示, 显示或隐藏.

bShow: 是否显示.

Jump to

Keyboard shortcuts

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