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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? font.h

?? 這是一款2d游戲引擎
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*  $Id: font.h,v 1.50 2004/01/02 15:42:43 mbn Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 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
**  Lesser General Public License for more details.
**
**  You should have received a copy of the GNU Lesser 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
**
*/

//! clanDisplay="Fonts"
//! header=display.h

#ifndef header_font
#define header_font

#if _MSC_VER > 1000
#pragma once
#endif

#ifdef _MSC_VER
#pragma warning( disable : 4786)
#endif

#include <string>
#include <utility> //For std::pair

#include "../Core/Math/origin.h"
#include "blend_func.h"
#include "color.h"
#include "../Core/Math/rect.h"
#include "../Core/Math/point.h"
#include "../Core/Math/size.h"
#include "../Core/Resources/resource.h"
#include "../Core/System/lazycopyptr.h"
#include "../Core/System/clonable.h"

class CL_GlyphBuffer;
class CL_Sprite;
class CL_TextStyler;
class CL_Font_Generic;
class CL_GraphicContext;
class CL_ResourceManager;

//: Draws text using system fonts or glyph sprites.
//- !group=Display/Fonts!
//- !header=display.h!
//- <p>A font can be constructed either from a CL_Sprite (aka a bitmap font) or from a system
//- font A bitmap font uses a CL_Sprite as the source for the font
//- glyphs (letters), where each frame frame in the sprite
//- represents one glyph. A string (<i>letter_chars</i>) is then
//- describing which character each glyph corresponds to. If the
//- sprite contains the letters ABCZXY123 in that order, then the
//- string should be "ABCZXY123". A system font uses the underlaying windowing system to create
//- the font glyphs. This means that in Windows you can choose any
//- TTF font, and same applies to X11 if the font server supports
//- it.</p>
//- <p>Newlines always have a width of zero.
//- Other than that, characters for which glyphs weren't specified have the width of a space.</p>
//- <p>Unlike CL_Surface and CL_Sprite, scaling affects the calculation
//- of any bounding rectangles (such as the result returned
//- by draw(), bounding_rect(), or get_size(), or the rectangle calculated internally by
//- draw() for alignment). This is because scaling
//- the CL_Font is effectively just changing the point size of the glyphs,
//- and that affects all sorts of things, such as word wrapping.</p>
//- <p>Word wrapping works automatically whenever you pass CL_Font a destination rectangle
//- or size with non-zero width. CL_Font uses the delims string (which can be changed
//- using the set_delims() method)
//- to determine where divisions between words are. Word wrapping does allow
//- blank characters (characters for which there isn't a glyph supplied)
//- to extend over the border line; this helps wrapped text to remain flush.</p>
class CL_Font
{
//! Construction:
public:
	//: Constructs a font.
	//- <p>If spacelen is unspecified, CL_Font attempts to resolve
	//- it itself. First, it looks to see if you have specified a
	//- space character in letter_chars: if you have, it uses that
	//- glyph's width as the space width (as well as using it
	//- to actually draw the space). If it does not find a space
	//- glyph, then it will look at every glyph's width and make
	//- the space width the average of that.</p>
	//param resource_id: Font resource name.
	//param manager: Resource manager used to load font.
	//param glyphs: CL_Sprite containing the letters of a bitmap font.
	//param letters: String mapping each frame of the bitmap font sprite to letters.
	//param spacelen: Width in pixels of the space glyph. If -1, uses the average of all glyph widths.
	//param monospace: If true, treats all glyphs as being the same width.
	//param font_name: System font name (eg. "Arial").
	//param letter_chars: The characters to include in the font (if a sprite font, must be in frame order).
	//param height: Height of font in pixels.
	//param width: Width of font in pixels. If 0, uses best fitting width for the specified height.
	//param bold: If true, will use bold font.
	//param italic: If true, will use italic font.
	//param underline: If true, will use underlined font.
	//param strikeout: If true, will use striked out font.
	CL_Font();
	
	CL_Font(const CL_Font &copy);
	
	CL_Font(
		const std::string &resource_id,
		CL_ResourceManager *manager);
	
	CL_Font(
		const CL_Sprite &glyphs,
		const std::string &letters,
		int spacelen = -1,
		bool monospace = false);
	
	CL_Font(
		const std::string &font_name,
		const std::string &letters,
		int height,
		int width = 0,
		bool bold = false,
		bool italic = false,
		bool underline = false,
		bool strikeout = false);
	
	CL_Font(
		const std::string &font_name,
		int height,
		int width = 0,
		bool bold = false,
		bool italic = false,
		bool underline = false,
		bool strikeout = false);
	
	virtual ~CL_Font();

//! Attributes:
public:
	//: Returns delimiters string.
	//- <p> This string contains characters (other than newline) that divide words apart.
	//- Do not include newline in this string, it's an implicit delimiter.</p>
	std::string get_delims() const;
	
	//: Returns width offset.
	//- <p> The width offset can be used to kern glyphs together or spread them apart. </p> 
	int get_width_offset() const;
	
	//: Returns height offset.
	//- <p> The height offset can be used to create space between lines, or to merge them together. </p> 
	int get_height_offset() const;
	
	//: Returns current scale.
	//- <p> 1.0f is normal scale, 2.0f is twice the size, etc. </p>
	void get_scale(float &x, float &y) const;

	//: Returns current alpha.
	//- <p> 0.0f is full transparency, and 1.0f is full visibility. </p>
	float get_alpha() const;

	//: Returns current color.
	//- <p> Alpha 0.0f is full transparency, and 1.0f is full visibility (solid). </p>
	void get_color(float &red, float &green, float &blue, float &alpha) const;
	CL_Color get_color() const {float r,g,b,a; get_color(r,g,b,a); return CL_Color(int(r*255.0f),int(g*255.0f),int(b*255.0f),int(a*255.0f));}

	//: Returns blending functions.
	void get_blend_func(CL_BlendFunc &src, CL_BlendFunc &dest) const;
	
	//: Returns glyph rotation hotspot.
	//- <p> This is for the optional angle parameter to draw_glyphs(). </p>
	void get_glyph_rot_hotspot(CL_Origin &origin, int &x, int &y) const;
	
	//: Returns translation hotspot.
	void get_alignment(CL_Origin &origin, int &x, int &y) const;
	
	//: Returns the drawn height of the entire font or a string.
	//return: The height in pixels.
	//param str: String to get the height of.
	//param start: A starting iterator, inclusive.
	//param end: An ending iterator, exclusive.
	//param max_size: Same effect as the size of the dest rectangle passed to draw(), for word wrapping and height truncating.
	//- <p> The height of the entire font is the height of the tallest glyph in the font; this
	//- is what is returned if you specify no arguments. The point of having the height functions
	//- accept a string is to compensate for strings spanning multiple lines. Generally, get_height(" ") will return zero, since usually 
	//- the space glyph isn't given in the font, and so it has a height and width of zero. </p>
	int get_height() const;
	
	int get_height(
		const std::string &str,
		CL_Size max_size = CL_Size(0,0)) const
		{return get_size(str, max_size).height;}
	
	int get_height(
		std::string::const_iterator start,
		std::string::const_iterator end,
		CL_Size max_size = CL_Size(0,0)) const
		{return get_size(start, end, max_size).height;}
	
	//: Returns the drawn width of a character or string.
	//return: The width in pixels.
	//param letter: Character to get the width of.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲韩国一区二区三区| 国产精品一线二线三线| 日韩午夜小视频| 久久福利视频一区二区| 久久人人爽人人爽| 盗摄精品av一区二区三区| 中文字幕视频一区| 欧美影视一区二区三区| 日本不卡一区二区三区| 2024国产精品| 成人高清免费在线播放| 亚洲黄色免费电影| 欧美一区二区三区婷婷月色| 久久99精品久久久久久动态图| 欧美精品一区二区三区蜜臀| 春色校园综合激情亚洲| 一区二区三区欧美久久| 日韩一级黄色片| 国产寡妇亲子伦一区二区| 中文字幕成人在线观看| 欧美视频在线一区二区三区 | 国产乱码精品一区二区三| 国产精品欧美一区喷水| 色嗨嗨av一区二区三区| 免费在线观看精品| 亚洲国产电影在线观看| 欧美亚州韩日在线看免费版国语版| 日韩中文字幕一区二区三区| 久久亚区不卡日本| 色综合天天天天做夜夜夜夜做| 五月婷婷激情综合| 久久久精品综合| 欧美在线观看一二区| 日韩精品亚洲专区| 国产精品欧美一区喷水| 6080亚洲精品一区二区| 欧美精品一区视频| 色悠久久久久综合欧美99| 蜜臀久久久久久久| 亚洲色图一区二区三区| 日韩欧美国产高清| 99久久99久久精品国产片果冻| 男人的天堂久久精品| 国产精品免费视频一区| 777欧美精品| www.爱久久.com| 麻豆成人久久精品二区三区小说| 最新高清无码专区| 日韩精品在线看片z| 色综合久久88色综合天天6| 精品无人码麻豆乱码1区2区| 自拍偷拍欧美精品| 亚洲精品一区二区在线观看| 欧美伊人久久久久久久久影院 | 91麻豆.com| 激情五月婷婷综合网| 一区二区三区四区av| 久久日一线二线三线suv| 欧美亚洲国产bt| 国产福利不卡视频| 日韩高清一区二区| 亚洲欧美国产高清| 久久久久久久网| 91精品国产色综合久久ai换脸 | 在线中文字幕不卡| 粉嫩在线一区二区三区视频| 美女视频网站久久| 一级日本不卡的影视| 国产午夜亚洲精品午夜鲁丝片| 欧美精品久久久久久久多人混战 | 欧美亚洲愉拍一区二区| 成人毛片老司机大片| 久久精品国产免费| 午夜在线成人av| 亚洲蜜臀av乱码久久精品 | 亚洲乱码国产乱码精品精98午夜 | 久久成人18免费观看| 亚洲午夜久久久久久久久久久| 日本一区二区视频在线观看| 日韩一区二区三区在线| 欧美日精品一区视频| 一本色道久久综合狠狠躁的推荐 | 欧美一区二区三区小说| 欧美三级乱人伦电影| 91免费视频网址| 国产黄色精品视频| 国产麻豆视频一区二区| 久久99最新地址| 日本美女一区二区三区视频| 亚洲成人资源在线| 一区二区在线观看免费| 国产精品美女久久久久久久 | 国产呦萝稀缺另类资源| 免费亚洲电影在线| 日韩av不卡一区二区| 亚洲h精品动漫在线观看| 亚洲免费观看高清完整版在线| 欧美激情一区二区| 国产日韩av一区二区| 久久精品视频一区二区三区| 久久只精品国产| 精品国产制服丝袜高跟| 制服丝袜在线91| 91精品福利在线一区二区三区 | 日韩国产欧美在线播放| 丝袜诱惑亚洲看片| 丝袜诱惑亚洲看片 | 午夜精品久久一牛影视| 亚洲成人动漫av| 天堂va蜜桃一区二区三区| 午夜激情一区二区三区| 日韩电影免费一区| 免费不卡在线视频| 久久99精品国产.久久久久 | 日本不卡123| 理论电影国产精品| 国产精品影视在线观看| 国产成人在线观看免费网站| 国产成人超碰人人澡人人澡| 国产成人av电影在线观看| 成人一区二区三区视频在线观看 | 精品国产91乱码一区二区三区| 日韩欧美的一区| 久久久久久久久久久99999| 亚洲国产高清在线| 亚洲精品中文在线| 偷窥国产亚洲免费视频| 美女任你摸久久| 国产精品资源在线看| 波多野结衣在线一区| 色悠悠久久综合| 6080日韩午夜伦伦午夜伦| www国产成人| 国产精品久久夜| 一区二区三区中文字幕| 日韩av中文在线观看| 国产麻豆日韩欧美久久| 91丨九色丨蝌蚪富婆spa| 欧美亚洲动漫精品| 欧美xfplay| 国产精品视频你懂的| 一区二区理论电影在线观看| 日韩精品一二三区| 国产一区999| 色狠狠一区二区三区香蕉| 欧美一区二区三区精品| 国产女人aaa级久久久级| 一区二区三区日韩欧美精品 | 视频在线观看91| 国内精品伊人久久久久av影院| 9久草视频在线视频精品| 欧美日韩一区二区三区在线| 26uuu成人网一区二区三区| 国产精品久久久久久久久久免费看| 亚洲国产精品人人做人人爽| 久久精品国产亚洲高清剧情介绍 | 粉嫩高潮美女一区二区三区| 色一区在线观看| 日韩精品中文字幕在线一区| 国产精品色在线| 日韩专区欧美专区| 成人免费视频一区| 欧美日韩成人在线| 久久免费电影网| 亚洲国产成人tv| 国产福利一区二区| 欧美精三区欧美精三区| 国产欧美日韩综合| 亚洲午夜电影网| 福利视频网站一区二区三区| 欧美性淫爽ww久久久久无| 久久综合狠狠综合| 亚洲一区二区视频在线观看| 另类小说一区二区三区| 色诱亚洲精品久久久久久| 26uuu欧美| 亚洲成a人v欧美综合天堂| 国产成人综合亚洲91猫咪| 在线成人免费视频| 国产精品国产三级国产三级人妇| 日韩福利视频网| 91日韩在线专区| 久久久久久久久久久99999| 婷婷久久综合九色综合伊人色| 成熟亚洲日本毛茸茸凸凹| 日韩三级视频在线观看| 亚洲欧美激情在线| 国产白丝网站精品污在线入口 | 欧美肥妇free| 亚洲欧洲色图综合| 国产一区中文字幕| 在线观看91精品国产麻豆| 亚洲欧美国产毛片在线| 国产精品 日产精品 欧美精品| 欧美疯狂性受xxxxx喷水图片| 亚洲三级久久久| 国产iv一区二区三区| 欧美高清一级片在线| 亚洲精品综合在线| 成人app软件下载大全免费|