亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pangocairo-context.c

?? linux
?? C
字號:
/* Pango * pangocairo-fontmap.c: Cairo font handling * * Copyright (C) 2000-2005 Red Hat Software * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */#include <config.h>#include "pangocairo.h"#include "pangocairo-private.h"#include "pango-impl-utils.h"#include <string.h>typedef struct _PangoCairoContextInfo PangoCairoContextInfo;struct _PangoCairoContextInfo{  double dpi;  cairo_font_options_t *set_options;  cairo_font_options_t *surface_options;  cairo_font_options_t *merged_options;  PangoCairoShapeRendererFunc shape_renderer_func;  gpointer                    shape_renderer_data;  GDestroyNotify              shape_renderer_notify;};static voidfree_context_info (PangoCairoContextInfo *info){  if (info->set_options)    cairo_font_options_destroy (info->set_options);  if (info->surface_options)    cairo_font_options_destroy (info->surface_options);  if (info->merged_options)    cairo_font_options_destroy (info->merged_options);  if (info->shape_renderer_notify)    info->shape_renderer_notify (info->shape_renderer_data);  g_slice_free (PangoCairoContextInfo, info);}static PangoCairoContextInfo *get_context_info (PangoContext *context,		  gboolean      create){  static GQuark context_info_quark;  PangoCairoContextInfo *info;  if (G_UNLIKELY (!context_info_quark))    context_info_quark = g_quark_from_static_string ("pango-cairo-context-info");  info = g_object_get_qdata (G_OBJECT (context), context_info_quark);  if (G_UNLIKELY (!info) && create)    {      info = g_slice_new0 (PangoCairoContextInfo);      info->dpi = -1.0;      g_object_set_qdata_full (G_OBJECT (context), context_info_quark,			       info, (GDestroyNotify)free_context_info);    }  return info;}static gboolean_pango_cairo_update_context (cairo_t      *cr,			     PangoContext *context){  PangoCairoContextInfo *info;  cairo_matrix_t cairo_matrix;  cairo_surface_t *target;  PangoMatrix pango_matrix;  const PangoMatrix *layout_matrix, identity_matrix = PANGO_MATRIX_INIT;  gboolean changed = FALSE;  info = get_context_info (context, TRUE);  cairo_get_matrix (cr, &cairo_matrix);  pango_matrix.xx = cairo_matrix.xx;  pango_matrix.yx = cairo_matrix.yx;  pango_matrix.xy = cairo_matrix.xy;  pango_matrix.yy = cairo_matrix.yy;  pango_matrix.x0 = cairo_matrix.x0;  pango_matrix.y0 = cairo_matrix.y0;  layout_matrix = pango_context_get_matrix (context);  if (!layout_matrix)    layout_matrix = &identity_matrix;  if (0 != memcmp (&pango_matrix, layout_matrix, sizeof (pango_matrix)))    changed = TRUE;  pango_context_set_matrix (context, &pango_matrix);  target = cairo_get_target (cr);  if (!info->surface_options) {    info->surface_options = cairo_font_options_create ();    changed = TRUE;    cairo_surface_get_font_options (target, info->surface_options);  } else {    cairo_font_options_t *surface_options = cairo_font_options_create ();    cairo_surface_get_font_options (target, surface_options);    if (!cairo_font_options_equal (surface_options, info->surface_options))      {	cairo_surface_get_font_options (target, info->surface_options);	changed = TRUE;      }    cairo_font_options_destroy (surface_options);  }  if (info->merged_options)    {      cairo_font_options_destroy (info->merged_options);      info->merged_options = NULL;    }  return changed;}/** * pango_cairo_update_context: * @cr: a Cairo context * @context: a #PangoContext, from pango_cairo_font_map_create_context() * * Updates a #PangoContext previously created for use with Cairo to * match the current transformation and target surface of a Cairo * context. If any layouts have been created for the context, * it's necessary to call pango_layout_context_changed() on those * layouts. * * Since: 1.10 **/voidpango_cairo_update_context (cairo_t      *cr,			    PangoContext *context){  g_return_if_fail (cr != NULL);  g_return_if_fail (PANGO_IS_CONTEXT (context));  (void) _pango_cairo_update_context (cr, context);}/** * pango_cairo_context_set_resolution: * @context: a #PangoContext, from pango_cairo_font_map_create_context() * @dpi: the resolution in "dots per inch". (Physical inches aren't actually *   involved; the terminology is conventional.) A 0 or negative value *   means to use the resolution from the font map. * * Sets the resolution for the context. This is a scale factor between * points specified in a #PangoFontDescription and Cairo units. The * default value is 96, meaning that a 10 point font will be 13 * units high. (10 * 96. / 72. = 13.3). * * Since: 1.10 **/voidpango_cairo_context_set_resolution (PangoContext *context,				    double        dpi){  PangoCairoContextInfo *info = get_context_info (context, TRUE);  info->dpi = dpi;}/** * pango_cairo_context_get_resolution: * @context: a #PangoContext, from pango_cairo_font_map_create_context() * * Gets the resolution for the context. See pango_cairo_context_set_resolution() * * Return value: the resolution in "dots per inch". A negative value will *  be returned if no resolution has previously been set. * * Since: 1.10 **/doublepango_cairo_context_get_resolution (PangoContext *context){  PangoCairoContextInfo *info = get_context_info (context, FALSE);  if (info)    return info->dpi;  else    return -1.0;}/** * pango_cairo_context_set_font_options: * @context: a #PangoContext, from pango_cairo_font_map_create_context() * @options: a #cairo_font_options_t, or %NULL to unset any previously set *           options. A copy is made. * * Sets the font options used when rendering text with this context. * These options override any options that pango_cairo_update_context() * derives from the target surface. * * Since: 1.10 */voidpango_cairo_context_set_font_options (PangoContext               *context,				      const cairo_font_options_t *options){  PangoCairoContextInfo *info;  g_return_if_fail (PANGO_IS_CONTEXT (context));  info  = get_context_info (context, TRUE);  if (info->set_options)    cairo_font_options_destroy (info->set_options);  if (options)    info->set_options = cairo_font_options_copy (options);  else    info->set_options = NULL;  if (info->merged_options)    {      cairo_font_options_destroy (info->merged_options);      info->merged_options = NULL;    }}/** * pango_cairo_context_get_font_options: * @context: a #PangoContext, from pango_cairo_font_map_create_context() * * Retrieves any font rendering options previously set with * pango_cairo_font_map_set_font_options(). This functions not report options * that are derived from the target surface by pango_cairo_update_context() * * Return value: the font options previously set on the context, or %NULL *   if no options have been set. This value is owned by the context *   and must not be modified or freed. * * Since: 1.10 **/G_CONST_RETURN cairo_font_options_t *pango_cairo_context_get_font_options (PangoContext *context){  PangoCairoContextInfo *info;  g_return_val_if_fail (PANGO_IS_CONTEXT (context), NULL);  info = get_context_info (context, FALSE);  if (info)    return info->set_options;  else    return NULL;}/** * _pango_cairo_context_merge_font_options: * @context: a #PangoContext * @options: a #cairo_font_options_t * * Merge together options from the target surface and explicitly set * on the context. * * Return value: the combined set of font options. This value is owned * by the context and must not be modified or freed. **/G_CONST_RETURN cairo_font_options_t *_pango_cairo_context_get_merged_font_options (PangoContext *context){  PangoCairoContextInfo *info = get_context_info (context, TRUE);  if (!info->merged_options)    {      info->merged_options = cairo_font_options_create ();      if (info->surface_options)	cairo_font_options_merge (info->merged_options, info->surface_options);      if (info->set_options)	cairo_font_options_merge (info->merged_options, info->set_options);    }  return info->merged_options;}/** * pango_cairo_context_set_shape_renderer: * @context: a #PangoContext, from pango_cairo_font_map_create_context() * @func: Callback function for rendering attributes of type * %PANGO_ATTR_SHAPE, or %NULL to disable shape rendering. * @data: User data that will be passed to @func. * @dnotify: Callback that will be called when the *           context is freed to release @data, or %NULL. * * Sets callback function for context to use for rendering attributes * of type %PANGO_ATTR_SHAPE.  See #PangoCairoShapeRendererFunc for * details. * * Since: 1.18 */voidpango_cairo_context_set_shape_renderer (PangoContext                *context,					PangoCairoShapeRendererFunc  func,					gpointer                     data,					GDestroyNotify               dnotify){  PangoCairoContextInfo *info;  g_return_if_fail (PANGO_IS_CONTEXT (context));  info  = get_context_info (context, TRUE);  if (info->shape_renderer_notify)    info->shape_renderer_notify (info->shape_renderer_data);  info->shape_renderer_func   = func;  info->shape_renderer_data   = data;  info->shape_renderer_notify = dnotify;}/** * pango_cairo_context_get_shape_renderer: * @context: a #PangoContext, from pango_cairo_font_map_create_context() * @data: Pointer to #gpointer to return user data * * Sets callback function for context to use for rendering attributes * of type %PANGO_ATTR_SHAPE.  See #PangoCairoShapeRendererFunc for * details. * * Retrieves callback function and associated user data for rendering * attributes of type %PANGO_ATTR_SHAPE as set by * pango_cairo_context_set_shape_renderer(), if any. * * Return value: the shape rendering callback previously set on the context, or %NULL *   if no shape rendering callback have been set. * * Since: 1.18 */PangoCairoShapeRendererFuncpango_cairo_context_get_shape_renderer (PangoContext                *context,					gpointer                    *data){  PangoCairoContextInfo *info;  g_return_val_if_fail (PANGO_IS_CONTEXT (context), NULL);  info = get_context_info (context, FALSE);  if (info)    {      if (data)        *data = info->shape_renderer_data;      return info->shape_renderer_func;    }  else    {      if (data)        *data = NULL;      return NULL;    }}/** * pango_cairo_create_layout: * @cr: a Cairo context * * Creates a layout object set up to match the current transformation * and target surface of the Cairo context.  This layout can then be * used for text measurement with functions like * pango_layout_get_size() or drawing with functions like * pango_cairo_show_layout(). If you change the transformation * or target surface for @cr, you need to call pango_cairo_update_layout() * * This function is the most convenient way to use Cairo with Pango, * however it is slightly inefficient since it creates a separate * #PangoContext object for each layout. This might matter in an * application that was laying out large amounts of text. * * Return value: the newly created #PangoLayout. Free with *   g_object_unref(). * * Since: 1.10 **/PangoLayout *pango_cairo_create_layout  (cairo_t *cr){  PangoFontMap *fontmap;  PangoContext *context;  PangoLayout *layout;  g_return_val_if_fail (cr != NULL, NULL);  fontmap = pango_cairo_font_map_get_default ();  context = pango_cairo_font_map_create_context ((PangoCairoFontMap *) (fontmap));  layout = pango_layout_new (context);  pango_cairo_update_context (cr, context);  g_object_unref (context);  return layout;}/** * pango_cairo_update_layout: * @cr: a Cairo context * @layout: a #PangoLayout, from pango_cairo_create_layout() * * Updates the private #PangoContext of a #PangoLayout created with * pango_cairo_create_layout() to match the current transformation * and target surface of a Cairo context. * * Since: 1.10 **/voidpango_cairo_update_layout (cairo_t     *cr,			   PangoLayout *layout){  g_return_if_fail (cr != NULL);  g_return_if_fail (PANGO_IS_LAYOUT (layout));  if (_pango_cairo_update_context (cr, pango_layout_get_context (layout)))    pango_layout_context_changed (layout);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费三级欧美电影| 捆绑调教美女网站视频一区| 久久免费的精品国产v∧| 欧美唯美清纯偷拍| 成人国产免费视频| 国产精品一品视频| 久久精品国产久精国产爱| 亚洲国产精品影院| 一区二区在线观看视频在线观看| 国产欧美日韩在线视频| 欧美精品一区二区三区在线| 91麻豆精品国产91久久久久久久久 | 99视频在线精品| 国产最新精品精品你懂的| 三级欧美在线一区| 日一区二区三区| 日本va欧美va瓶| 日韩精品欧美精品| 麻豆91在线播放| 捆绑调教美女网站视频一区| 久久69国产一区二区蜜臀| 精品一二三四在线| 国产综合色产在线精品| 国产成人夜色高潮福利影视| 国产精品久久久久久妇女6080 | 一区二区三区国产精品| 亚洲激情欧美激情| 日本午夜一区二区| 国产精品2024| 欧洲一区二区三区免费视频| 欧美日韩一级大片网址| 日韩欧美成人激情| 国产精品私人影院| 亚洲国产日韩av| 国内久久精品视频| 91网站最新地址| 日韩欧美第一区| 国产精品国产自产拍在线| 亚洲精品亚洲人成人网 | 99精品视频中文字幕| 欧美久久久影院| 国产精品每日更新在线播放网址 | 亚洲国产精品成人综合色在线婷婷| 国产精品网站一区| 久久97超碰色| 91久久久免费一区二区| 久久亚洲精华国产精华液| 亚洲综合999| 91亚洲资源网| 国产调教视频一区| 久久99在线观看| 欧美xxx久久| 亚洲一区自拍偷拍| 9久草视频在线视频精品| 日韩欧美一级特黄在线播放| 亚洲精品高清在线| 99精品欧美一区二区三区小说| 久久一区二区三区国产精品| 日韩av网站在线观看| 日本久久一区二区| 亚洲制服欧美中文字幕中文字幕| 成人性生交大片免费看中文网站| 精品日韩成人av| 精品在线一区二区三区| 91精品久久久久久久91蜜桃| 日韩精品每日更新| 欧美一区二区精品在线| 免费观看91视频大全| 欧美成人三级在线| 国产最新精品免费| 国产三级精品三级| a级精品国产片在线观看| 久久久亚洲高清| 成人av网站在线| 一区二区三区在线视频观看58 | 国产一区二区视频在线播放| 亚洲国产成人自拍| 99视频精品在线| 亚洲图片欧美综合| 精品国精品国产| 97se亚洲国产综合自在线观| 亚洲国产日产av| 欧美成人福利视频| 成人av在线资源| 亚洲国产一区在线观看| 久久网站最新地址| 日本精品一区二区三区高清| 欧美aaaaa成人免费观看视频| 精品国产a毛片| 欧美性生交片4| 国产福利电影一区二区三区| 亚洲影院理伦片| 国产丝袜美腿一区二区三区| 欧美视频在线一区| 国产成人精品www牛牛影视| 亚洲国产日韩在线一区模特| 国产亚洲1区2区3区| 欧美一区二区三区视频| 91久久香蕉国产日韩欧美9色| 麻豆91精品91久久久的内涵| 亚洲免费av观看| 国产精品久线在线观看| 欧美xxxxx牲另类人与| 在线视频亚洲一区| 欧美在线一区二区三区| 国产成人免费在线视频| 毛片基地黄久久久久久天堂| 一区二区在线观看不卡| 中文字幕 久热精品 视频在线| 欧美变态tickle挠乳网站| 欧美乱熟臀69xxxxxx| 在线亚洲欧美专区二区| 一本久道中文字幕精品亚洲嫩| 国产精品一区二区你懂的| 老司机精品视频导航| 日本不卡一二三| 日韩av中文在线观看| 蜜臀av性久久久久蜜臀av麻豆| 亚洲成av人片一区二区| 首页亚洲欧美制服丝腿| 婷婷六月综合网| 免费成人美女在线观看.| 久久电影网站中文字幕| 久久99久久精品| 成人永久aaa| 91国产丝袜在线播放| 欧美日韩不卡一区| 精品少妇一区二区三区视频免付费 | 日韩精品中文字幕一区二区三区| 欧美丰满少妇xxxxx高潮对白| 日韩一区二区在线观看| 2020日本不卡一区二区视频| 成人免费一区二区三区视频| 一区二区三区欧美久久| 天天操天天干天天综合网| 麻豆视频一区二区| 国产成人av一区二区三区在线观看| 99久久婷婷国产| 日韩一区二区在线免费观看| 国产精品久久久久久久午夜片| 亚洲一区二区三区在线| 狠狠色丁香久久婷婷综| 99在线精品免费| 欧美大片在线观看| 亚洲精品免费播放| 国产一区二区三区四区五区入口| 99精品视频一区二区| 8x福利精品第一导航| 日韩理论电影院| 国产美女久久久久| 91精品国产欧美一区二区18 | 美女高潮久久久| 欧美亚洲动漫另类| 国产精品护士白丝一区av| 久久99精品久久久| 欧美日韩高清一区二区三区| 国产精品美女久久久久高潮| 国产在线视频一区二区| 欧美区视频在线观看| 一区二区三区毛片| 99国产精品一区| 亚洲欧美二区三区| 97se亚洲国产综合自在线| 亚洲国产精华液网站w| 国产另类ts人妖一区二区| 欧美大白屁股肥臀xxxxxx| 亚洲综合激情另类小说区| 91麻豆国产精品久久| 中文字幕一区二区三区精华液 | 成人激情免费网站| 精品美女一区二区三区| 日韩视频在线你懂得| 中文字幕在线不卡视频| 国产成人在线观看| 国产视频亚洲色图| 国产一区二区三区免费播放| 精品免费视频.| 成人午夜免费电影| 国产精品久久久久一区二区三区| 国产aⅴ综合色| 亚洲欧美电影一区二区| 在线一区二区三区四区五区| 亚洲电影你懂得| 欧美大片在线观看一区二区| 国产在线不卡一区| 亚洲国产成人午夜在线一区| 91在线码无精品| 久久99国产精品尤物| 最新国产精品久久精品| 91小视频在线| 九九在线精品视频| 亚洲欧美一区二区三区孕妇| 欧美精品自拍偷拍| 久久99精品国产.久久久久| 中文字幕国产一区二区| 欧美日韩不卡一区| 成人黄色大片在线观看| 亚洲成人午夜影院| 2021久久国产精品不只是精品| 91色乱码一区二区三区|