font

package
v1.3.310 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 3 Imported by: 10

Documentation

Overview

字体.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Font

type Font struct {
	objectbase.ObjectBase
}

字体.

func NewFont

func NewFont(size int) *Font

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

size: 字体大小.

func NewFontByHandle

func NewFontByHandle(handle int) *Font

从句柄创建对象.

func NewFontByName

func NewFontByName(name string) *Font

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

func NewFontEX

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

字体_创建扩展, 创建炫彩字体, 返回字体句柄.

pName: 字体名称.

size: 字体大小, 单位(pt,磅).

style: 字体样式, FontStyle_.

func NewFontFromFile

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

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

pFontFile: 字体文件名.

size: 字体大小, 单位(pt,磅).

style: 字体样式, FontStyle_.

func NewFontFromFont

func NewFontFromFont(pFont int) *Font

字体_创建从Font, 创建炫彩字体从GDI+字体(Font).

pFont: GDI+字体指针(Font*).

func NewFontFromHFONT

func NewFontFromHFONT(hFont int) *Font

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

hFont: 字体句柄.

func NewFontFromMem

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

字体_创建从内存, 创建炫彩字体从内存, 返回字体句柄.

data: 字体文件数据.

fontSize: 字体大小, 单位(pt,磅).

style: 字体样式, FontStyle_.

func NewFontFromRes

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

字体_创建从资源, 创建字体从资源, 返回炫彩字体句柄.

id: xx.

pType: xx.

fontSize: 字体大小, 单位(pt,磅).

style: 字体样式, FontStyle_.

hModule: xx.

func NewFontLOGFONTW

func NewFontLOGFONTW(pFontInfo *xc.LOGFONTW) *Font

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

pFontInfo: 字体信息.

func (*Font) AddRef

func (f *Font) AddRef() int

字体_增加引用计数.

func (*Font) Destroy

func (f *Font) Destroy() int

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

func (*Font) EnableAutoDestroy

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

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

bEnable: 是否启用.

func (*Font) GetFont

func (f *Font) GetFont() int

字体_取Font, 获取字体, 返回GDI+ Font指针.

func (*Font) GetFontInfo

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

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

pInfo: 接收返回的字体信息.

func (*Font) GetLOGFONTW

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

字体_取LOGFONTW, 获取字体LOGFONTW.

hdc: hdc句柄.

pOut: 接收返回信息.

func (*Font) GetRefCount

func (f *Font) GetRefCount() int

字体_取引用计数.

func (*Font) Release

func (f *Font) Release() int

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

Jump to

Keyboard shortcuts

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