⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cairo-cairo-surface-t.html

📁 按照官方的说法:Cairo is a vector graphics library with cross-device output support. 翻译过来
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>cairo_surface_t</title><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="Cairo: A Vector Graphics Library"><link rel="up" href="Surfaces.html" title="Surfaces"><link rel="prev" href="Surfaces.html" title="Surfaces"><link rel="next" href="cairo-Image-Surfaces.html" title="Image Surfaces"><meta name="generator" content="GTK-Doc V1.6 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="part" href="pt01.html" title="Part&#160;I.&#160;Tutorial"><link rel="part" href="pt02.html" title="Part&#160;II.&#160;Reference"><link rel="chapter" href="Drawing.html" title="Drawing"><link rel="chapter" href="Fonts.html" title="Fonts"><link rel="chapter" href="Surfaces.html" title="Surfaces"><link rel="chapter" href="Support.html" title="Utilities"><link rel="index" href="ix01.html" title="Index"><link rel="appendix" href="language-bindings.html" title="Appendix&#160;A.&#160;Creating a language binding for cairo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="Surfaces.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="Surfaces.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Cairo: A Vector Graphics Library</th><td><a accesskey="n" href="cairo-Image-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>                  &#160;|&#160;                  <a href="#desc" class="shortcut">Description</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="cairo-cairo-surface-t"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle"><a name="top_of_page"></a>cairo_surface_t</span></h2><p>cairo_surface_t &#8212; Base class for surfaces</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><pre class="synopsis">typedef     <a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>;enum        <a href="cairo-cairo-surface-t.html#cairo-content-t">cairo_content_t</a>;<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* <a href="cairo-cairo-surface-t.html#cairo-surface-create-similar">cairo_surface_create_similar</a>                                            (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *other,                                             <a href="cairo-cairo-surface-t.html#cairo-content-t">cairo_content_t</a> content,                                             int width,                                             int height);void        <a href="cairo-cairo-surface-t.html#cairo-surface-destroy">cairo_surface_destroy</a>           (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);void        <a href="cairo-cairo-surface-t.html#cairo-surface-finish">cairo_surface_finish</a>            (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);void        <a href="cairo-cairo-surface-t.html#cairo-surface-flush">cairo_surface_flush</a>             (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);void        <a href="cairo-cairo-surface-t.html#cairo-surface-get-font-options">cairo_surface_get_font_options</a>  (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,                                             <a href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);<a href="cairo-cairo-surface-t.html#cairo-content-t">cairo_content_t</a> <a href="cairo-cairo-surface-t.html#cairo-surface-get-content">cairo_surface_get_content</a>   (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);<a href="cairo-Error-handling.html#cairo-status-t">cairo_status_t</a> <a href="cairo-cairo-surface-t.html#cairo-surface-set-user-data">cairo_surface_set_user_data</a>  (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,                                             const <a href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key,                                             void *user_data,                                             <a href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);void*       <a href="cairo-cairo-surface-t.html#cairo-surface-get-user-data">cairo_surface_get_user_data</a>     (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,                                             const <a href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);void        <a href="cairo-cairo-surface-t.html#cairo-surface-mark-dirty">cairo_surface_mark_dirty</a>        (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);void        <a href="cairo-cairo-surface-t.html#cairo-surface-mark-dirty-rectangle">cairo_surface_mark_dirty_rectangle</a>                                            (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,                                             int x,                                             int y,                                             int width,                                             int height);<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* <a href="cairo-cairo-surface-t.html#cairo-surface-reference">cairo_surface_reference</a>    (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);void        <a href="cairo-cairo-surface-t.html#cairo-surface-set-device-offset">cairo_surface_set_device_offset</a> (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,                                             double x_offset,                                             double y_offset);void        <a href="cairo-cairo-surface-t.html#cairo-surface-get-device-offset">cairo_surface_get_device_offset</a> (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,                                             double *x_offset,                                             double *y_offset);void        <a href="cairo-cairo-surface-t.html#cairo-surface-set-fallback-resolution">cairo_surface_set_fallback_resolution</a>                                            (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,                                             double x_pixels_per_inch,                                             double y_pixels_per_inch);<a href="cairo-Error-handling.html#cairo-status-t">cairo_status_t</a> <a href="cairo-cairo-surface-t.html#cairo-surface-status">cairo_surface_status</a>         (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);enum        <a href="cairo-cairo-surface-t.html#cairo-surface-type-t">cairo_surface_type_t</a>;<a href="cairo-cairo-surface-t.html#cairo-surface-type-t">cairo_surface_type_t</a> <a href="cairo-cairo-surface-t.html#cairo-surface-get-type">cairo_surface_get_type</a> (<a href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre></div><div class="refsect1" lang="en"><a name="desc"></a><h2>Description</h2><p></p></div><div class="refsect1" lang="en"><a name="details"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2584196"></a><h3><a name="cairo-surface-t"></a>cairo_surface_t</h3><a class="indexterm" name="id2584208"></a><pre class="programlisting">typedef struct _cairo_surface cairo_surface_t;</pre><p>A <a href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> represents an image, either as the destinationof a drawing operation or as source when drawing onto anothersurface. There are different subtypes of cairo_surface_t fordifferent drawing backends; for example, <a href="cairo-Image-Surfaces.html#cairo-image-surface-create"><code class="function">cairo_image_surface_create()</code></a>creates a bitmap image in memory.</p><p>Memory management of <a href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> is done with<a href="cairo-cairo-surface-t.html#cairo-surface-reference"><code class="function">cairo_surface_reference()</code></a> and <a href="cairo-cairo-surface-t.html#cairo-surface-destroy"><code class="function">cairo_surface_destroy()</code></a>.</p><p></p></div><hr><div class="refsect2" lang="en"><a name="id2584276"></a><h3><a name="cairo-content-t"></a>enum cairo_content_t</h3><a class="indexterm" name="id2584288"></a><pre class="programlisting">typedef enum _cairo_content {    CAIRO_CONTENT_COLOR		= 0x1000,    CAIRO_CONTENT_ALPHA		= 0x2000,    CAIRO_CONTENT_COLOR_ALPHA	= 0x3000} cairo_content_t;</pre><p><a href="cairo-cairo-surface-t.html#cairo-content-t"><span class="type">cairo_content_t</span></a> is used to describe the content that a surface willcontain, whether color information, alpha information (translucencevs. opacity), or both.</p><p>Note: The large values here are designed to keep cairo_content_tvalues distinct from cairo_format_t values so that theimplementation can detect the error if users confuse the two types.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a name="CAIRO-CONTENT-COLOR:CAPS"></a><code class="literal">CAIRO_CONTENT_COLOR</code></span></td><td> The surface will hold color content only.</td></tr><tr><td><span class="term"><a name="CAIRO-CONTENT-ALPHA:CAPS"></a><code class="literal">CAIRO_CONTENT_ALPHA</code></span></td><td> The surface will hold alpha content only.</td></tr><tr><td><span class="term"><a name="CAIRO-CONTENT-COLOR-ALPHA:CAPS"></a><code class="literal">CAIRO_CONTENT_COLOR_ALPHA</code></span></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -