PDF-glyph

#ifndef MUPDF_FITZ_GLYPH_H
#define MUPDF_FITZ_GLYPH_H

#include “mupdf/fitz/system.h”
#include “mupdf/fitz/context.h”
#include “mupdf/fitz/geometry.h”
#include “mupdf/fitz/store.h”

/**
Glyphs represent a run length encoded set of pixels for a 2
dimensional region of a plane.
字形表示一个游程长度编码的像素集,用于平面的 2维区域。
*/
typedef struct fz_glyph fz_glyph;

/**
Return the bounding box of the glyph in pixels.
以像素为单位返回字形的边界框。
*/
fz_irect fz_glyph_bbox(fz_context *ctx, fz_glyph *glyph);
fz_irect fz_glyph_bbox_no_ctx(fz_glyph *src);

/**
Return the width of the glyph in pixels.
以像素为单位返回字形的宽度。
*/
int fz_glyph_width(fz_context *ctx, fz_glyph *glyph);

/**
Return the height of the glyph in pixels.
以像素为单位返回字形的高度。
*/
int fz_glyph_height(fz_context *ctx, fz_glyph *glyph);

/**
Take a reference to a glyph.

pix: The glyph to increment the reference for.

Returns pix.
引用一个字形。
pix:要为其增加引用的字形。

返回像素。

*/
fz_glyph *fz_keep_glyph(fz_context *ctx, fz_glyph *pix);

/**
Drop a reference and free a glyph.

Decrement the reference count for the glyph. When no
references remain the glyph will be freed.
删除一个引用并释放一个字形。

减少字形的引用计数。 当没有
引用仍然是字形将被释放。

*/
void fz_drop_glyph(fz_context *ctx, fz_glyph *pix);

/**
Look a glyph up from a font, and return the outline of the
glyph using the given transform.

The caller owns the returned path, and so is responsible for
ensuring that it eventually gets dropped.
从字体向上查找字形,并返回字体的轮廓
使用给定变换的字形。

调用者拥有返回的路径,因此负责
确保它最终被丢弃。

*/
fz_path *fz_outline_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix ctm);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值