font

package
v1.3.360 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 4 Imported by: 10

Documentation

Overview

Package font 字体.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Font

type Font struct {
	objectbase.ObjectBase
}

Font 炫彩字体.

func New added in v1.3.352

func New(size int) *Font

New 字体_创建, 创建炫彩字体. 当字体句柄与元素关联后, 会自动释放.

@param size 字体大小,单位(pt,磅).
@return *Font 返回字体对象.

func NewByFile added in v1.3.352

func NewByFile(pFontFile string, size int, style xcc.FontStyle_) *Font

NewByFile 字体_创建从文件. 创建字体从文件.

@param pFontFile 字体文件名.
@param size 字体大小, 单位(pt,磅).
@param style 字体样式, xcc.FontStyle_.
@return *Font 返回字体对象.

func NewByFont added in v1.3.352

func NewByFont(pFont int) *Font

NewByFont 字体_创建从Font. 创建炫彩字体从GDI+字体.

@param pFont GDI+字体指针.
@return *Font 返回字体对象.

func NewByHFONT added in v1.3.352

func NewByHFONT(hFont int) *Font

NewByHFONT 字体_创建从HFONT. 创建炫彩字体从现有HFONT字体.

@param hFont 字体句柄.
@return *Font 返回字体对象.

func NewByHandle added in v1.3.352

func NewByHandle(handle int) *Font

NewByHandle 从句柄创建对象.

@param handle
@return *Font

func NewByMem added in v1.3.352

func NewByMem(data []byte, fontSize int, style xcc.FontStyle_) *Font

NewByMem 字体_创建从内存. 创建炫彩字体从内存.

@param data 字体文件数据.
@param fontSize 字体大小, 单位(pt,磅).
@param style 字体样式, xcc.FontStyle_.
@return *Font 返回字体对象.

func NewByName added in v1.3.352

func NewByName(name string) *Font

NewByName 根据资源文件中的name创建对象, 失败返回nil.

@param name
@return *Font

func NewByRes added in v1.3.352

func NewByRes(id int, pType string, fontSize int, style xcc.FontStyle_, hModule int) *Font

NewByRes 字体_创建从资源. 创建字体从资源.

@param id xx.
@param pType xx.
@param fontSize 字体大小, 单位(pt,磅).
@param style 字体样式, xcc.FontStyle_.
@param hModule xx.
@return *Font 返回字体对象.

func NewByZip added in v1.3.352

func NewByZip(pZipFileName, pFileName, pPassword string, fontSize int, style xcc.FontStyle_) *Font

NewByZip 字体_创建从ZIP.

@param pZipFileName zip文件名.
@param pFileName 字体文件名.
@param pPassword zip密码.
@param fontSize 字体大小, 单位(pt,磅).
@param style 字体样式: xcc.FontStyle_.
@return *Font 返回炫彩字体对象.

func NewByZipMem added in v1.3.352

func NewByZipMem(data []byte, pFileName, pPassword string, fontSize int, style xcc.FontStyle_) *Font

NewByZipMem 字体_创建从内存ZIP.

@param data zip数据.
@param pFileName 字体文件名.
@param pPassword zip密码.
@param fontSize 字体大小, 单位(pt,磅).
@param style 字体样式: xcc.FontStyle_.
@return *Font 返回炫彩字体对象.

func NewEX added in v1.3.352

func NewEX(pName string, size int, style xcc.FontStyle_) *Font

NewEX 字体_创建扩展. 创建炫彩字体.

@param pName 字体名称.
@param size 字体大小, 单位(pt,磅).
@param style 字体样式, xcc.FontStyle_.
@return *Font 返回字体对象.

func NewFont

func NewFont(size int) *Font

Deprecated

!已废弃, 请使用 font.New().

func NewFontByHandle

func NewFontByHandle(handle int) *Font

Deprecated

!已废弃, 请使用 font.NewByHandle().

func NewFontByName

func NewFontByName(name string) *Font

Deprecated

!已废弃, 请使用 font.NewByName().

func NewFontEX

func NewFontEX(pName string, size int, style xcc.FontStyle_) *Font

Deprecated

!已废弃, 请使用 font.NewEX().

func NewFontFromFile

func NewFontFromFile(pFontFile string, size int, style xcc.FontStyle_) *Font

Deprecated

!已废弃, 请使用 font.NewByFile().

func NewFontFromFont

func NewFontFromFont(pFont int) *Font

Deprecated

!已废弃, 请使用 font.NewByFont().

func NewFontFromHFONT

func NewFontFromHFONT(hFont int) *Font

Deprecated

!已废弃, 请使用 font.NewByHFONT().

func NewFontFromMem

func NewFontFromMem(data []byte, fontSize int, style xcc.FontStyle_) *Font

Deprecated

!已废弃, 请使用 font.NewByMem().

func NewFontFromRes

func NewFontFromRes(id int, pType string, fontSize int, style xcc.FontStyle_, hModule int) *Font

Deprecated

!已废弃, 请使用 font.NewByRes().

func NewFontFromZip added in v1.3.350

func NewFontFromZip(pZipFileName, pFileName, pPassword string, fontSize int, style xcc.FontStyle_) *Font

Deprecated

!已废弃, 请使用 font.NewByZip().

func NewFontFromZipMem added in v1.3.350

func NewFontFromZipMem(data []byte, pFileName, pPassword string, fontSize int, style xcc.FontStyle_) *Font

Deprecated

!已废弃, 请使用 font.NewByZipMem().

func NewFontLOGFONTW

func NewFontLOGFONTW(pFontInfo *xc.LOGFONTW) *Font

Deprecated

!已废弃, 请使用 font.NewLOGFONTW().

func NewLOGFONTW added in v1.3.352

func NewLOGFONTW(pFontInfo *xc.LOGFONTW) *Font

NewLOGFONTW 字体_创建从LOGFONT. 创建炫彩字体.

@param pFontInfo 字体信息.
@return *Font 返回字体对象.

func (*Font) AddRef

func (f *Font) AddRef() int

AddRef 字体_增加引用计数.

@return int

func (*Font) Destroy

func (f *Font) Destroy() int

Destroy 字体_销毁. 强制销毁炫彩字体, 谨慎使用, 建议使用 Release() 释放.

@return int

func (*Font) EnableAutoDestroy

func (f *Font) EnableAutoDestroy(bEnable bool) int

EnableAutoDestroy 字体_启用自动销毁. 是否自动销毁.

@param bEnable 是否启用.
@return int

func (*Font) GetFont

func (f *Font) GetFont() int

GetFont 字体_取Font. 获取字体.

@return int 返回GDI+ Font指针

func (*Font) GetFontInfo

func (f *Font) GetFontInfo(pInfo *xc.Font_Info_) int

GetFontInfo 字体_取信息. 获取字体信息.

@param pInfo 接收返回的字体信息.
@return int

func (*Font) GetLOGFONTW

func (f *Font) GetLOGFONTW(hdc int, pOut *xc.LOGFONTW) bool

GetLOGFONTW 字体_取LOGFONTW. 获取字体LOGFONTW.

@param hdc hdc句柄.
@param pOut 接收返回信息.
@return bool

func (*Font) GetRefCount

func (f *Font) GetRefCount() int

GetRefCount 字体_取引用计数.

@return int

func (*Font) Release

func (f *Font) Release() int

Release 字体_释放引用计数. 释放引用计数, 当引用计数为0时自动销毁.

@return int

Jump to

Keyboard shortcuts

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