#ifndef MUPDF_FITZ_PIXMAP_H
#define MUPDF_FITZ_PIXMAP_H
#include “mupdf/fitz/system.h”
#include “mupdf/fitz/context.h”
#include “mupdf/fitz/geometry.h”
#include “mupdf/fitz/store.h”
#include “mupdf/fitz/separation.h”
/**
Pixmaps represent a set of pixels for a 2 dimensional region of
a plane. Each pixel has n components per pixel. The components
are in the order process-components, spot-colors, alpha, where
there can be 0 of any of those types. The data is in
premultiplied alpha when rendering, but non-premultiplied for
colorspace conversions and rescaling.
像素图表示二维区域的一组像素
一架飞机。 每个像素每个像素有 n 个分量。 组件
顺序是流程组件、专色、alpha,其中
这些类型中的任何一种都可以是 0。 数据在
渲染时预乘 alpha,但未预乘
色彩空间转换和重新缩放。
*/
typedef struct fz_overprint fz_overprint;
/**
Return the bounding box for a pixmap.
返回像素图的边界框。
*/
fz_irect fz_pixmap_bbox(fz_context *ctx, const fz_pixmap *pix);
/**
Return the width of the pixmap in pixels.
以像素为单位返回像素图的宽度。
*/
int fz_pixmap_width(fz_context *ctx, const fz_pixmap *pix);
/**
Return the height of the pixmap in pixels.
以像素为单位返回像素图的高度。
*/
int fz_pixmap_height(fz_context *ctx, const fz_pixmap *pix);
/**
Return the x value of the pixmap in pixels.
以像素为单位返回像素图的 x 值。
*/
int fz_pixmap_x(fz_context *ctx, const fz_pixmap *pix);
/**
Return the y value of the pixmap in pixels.
以像素为单位返回像素图的 y 值。
*/
int fz_pixmap_y(fz_context *ctx, const fz_pixmap *pix);
/**
Create a new pixmap, with its origin at (0,0)
cs: The colorspace to use for the pixmap, or NULL for an alpha
plane/mask.
w: The width of the pixmap (in pixels)
h: The height of the pixmap (in pixels)
seps: Details of separations.
alpha: 0 for no alpha, 1 for alpha.
Returns a pointer to the new pixmap. Throws exception on failure
to allocate.
创建一个新的像素图,其原点为 (0,0)
cs:用于像素图的色彩空间,或 NULL 用于 alpha
飞机/面具。
w:像素图的宽度(以像素为单位)
h:像素图的高度(以像素为单位)
seps:分离细节。
alpha:0 表示没有 alpha,1 表示 alpha。
返回指向新像素图的指针。 失败时抛出异常
分配。
*/
fz_pixmap *fz_new_pixmap(fz_context *ctx, fz_colorspace *cs, int w, int h, fz_separations *seps, int alpha);
/**
Create a pixmap of a given size, location and pixel format.
The bounding box specifies the size of the created pixmap and
where it will be located. The colorspace determines the number
of components per pixel. Alpha is always present. Pixmaps are
reference counted, so drop references using fz_drop_pixmap.
colorspace: Colorspace format used for the created pixmap. The
pixmap will keep a reference to the colorspace.
bbox: Bounding box specifying location/size of created pixmap.
seps: Details of separations.
alpha: 0 for no alpha, 1 for alpha.
Returns a pointer to the new pixmap. Throws exception on failure
to allocate.
创建给定大小、位置和像素格式的像素图。
边界框指定创建的像素图的大小和
它将位于何处。 色彩空间决定数量
每个像素的组件数。 阿尔法永远存在。 像素图是
引用计数,因此使用 fz_drop_pixmap 删除引用。
颜色空间:用于创建的像素图的颜色空间格式。 这
pixmap 将保留对颜色空间的引用。
bbox:指定创建像素图的位置/大小的边界框。
seps:分离细节。
alpha:0 表示没有 alpha,1 表示 alpha。
返回指向新像素图的指针。 失败时抛出异常
分配。
*/
fz_pixmap *fz_new_pixmap_with_bbox(fz_context *ctx, fz_colorspace *colorspace, fz_irect bbox, fz_separations *seps, int alpha);
/**
Create a new pixmap, with its origin at
(0,0) using the supplied data block.
cs: The colorspace to use for the pixmap, or NULL for an alpha
plane/mask.
w: The width of the

最低0.47元/天 解锁文章
346

被折叠的 条评论
为什么被折叠?



