亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
色综合网色综合| 成人一区二区在线观看| 中文字幕一区二区三区乱码在线 | 91麻豆精品国产91久久久久久久久| 国产精品影音先锋| 国产酒店精品激情| 成人动漫一区二区在线| 99视频精品在线| 在线视频综合导航| 欧美精品久久一区二区三区 | 亚洲精品乱码久久久久久黑人| 国产精品免费免费| 国产欧美一区二区精品性色| 26uuu久久综合| 中文字幕久久午夜不卡| 亚洲综合精品自拍| 亚洲香蕉伊在人在线观| 日产欧产美韩系列久久99| 黄色资源网久久资源365| av资源站一区| 欧美成人三级在线| 一区二区三区欧美| 国产一区二区三区最好精华液| 不卡的av在线| 欧美精品一区二区三区蜜桃| 中文字幕中文字幕在线一区 | 91久久精品一区二区二区| 欧美夫妻性生活| 亚洲免费观看高清完整| 激情小说亚洲一区| 激情成人午夜视频| 欧美人与禽zozo性伦| 国产精品女主播av| 麻豆高清免费国产一区| 欧美日韩成人综合在线一区二区 | 一区二区三区免费网站| 国产精品中文有码| 欧美成人女星排名| 日韩成人伦理电影在线观看| 色综合久久99| 亚洲国产精品视频| 欧美色图免费看| 亚洲不卡av一区二区三区| 成人永久aaa| 亚洲日本一区二区| 色老汉一区二区三区| 日韩一区中文字幕| 在线区一区二视频| 石原莉奈在线亚洲二区| 日韩色在线观看| 日本美女视频一区二区| 精品1区2区3区| 日韩av一区二区在线影视| 欧美大片日本大片免费观看| 秋霞午夜鲁丝一区二区老狼| 日韩女优av电影| 成人少妇影院yyyy| 亚洲精品五月天| 日韩精品一区二区三区在线观看| 精品一区二区三区在线观看 | 成人深夜视频在线观看| 一个色在线综合| 日韩免费看网站| 91蜜桃视频在线| 国产九色精品成人porny| 亚洲欧美日本在线| 久久五月婷婷丁香社区| 色哦色哦哦色天天综合| 精品无码三级在线观看视频| 国产精品无圣光一区二区| 成人av在线看| 蜜桃久久久久久久| 亚洲欧美视频一区| 欧美va亚洲va香蕉在线| 欧美日韩精品一区二区| 丰满少妇在线播放bd日韩电影| 亚洲电影中文字幕在线观看| 欧美国产欧美亚州国产日韩mv天天看完整 | 国产成人自拍网| 蜜臀久久99精品久久久久宅男 | 欧美在线免费视屏| 99麻豆久久久国产精品免费| 精品在线免费观看| 亚洲成精国产精品女| 亚洲另类一区二区| 日韩美女精品在线| 亚洲色图在线播放| 久久综合一区二区| 久久网站最新地址| 久久久久久综合| 国产精品家庭影院| 亚洲日本一区二区三区| 一区二区免费在线| 天堂久久久久va久久久久| 日一区二区三区| 国模套图日韩精品一区二区 | 日韩欧美的一区| 久久久久久久久免费| 欧美激情中文字幕| 亚洲欧洲性图库| 亚洲图片有声小说| 免费在线观看日韩欧美| 国产精品456| 欧美中文字幕久久| 精品国产污网站| 国产精品免费人成网站| 亚洲成人av电影在线| 国产九色精品成人porny| 国产成人在线网站| 99精品欧美一区二区三区小说 | 狠狠色综合播放一区二区| 成人一区在线观看| 欧美精品三级日韩久久| 日本一区二区三区免费乱视频| 一区二区三区中文在线| 国产精品中文字幕欧美| 3d动漫精品啪啪一区二区竹菊| 久久久国产精品午夜一区ai换脸| 亚洲综合久久久久| 91年精品国产| 欧美精品一区二区在线观看| 亚洲午夜av在线| av成人免费在线观看| 久久精品一级爱片| 琪琪一区二区三区| 欧洲激情一区二区| 夜夜揉揉日日人人青青一国产精品| 国产一区中文字幕| 精品久久久久久久人人人人传媒| 亚洲国产成人91porn| 国产精品888| 26uuu另类欧美亚洲曰本| 久久草av在线| 国产午夜精品理论片a级大结局| 日韩国产一二三区| 日韩一区二区三区四区| 日本怡春院一区二区| 日韩欧美一区电影| 国产又黄又大久久| 国产精品狼人久久影院观看方式| 国产精品一区二区黑丝| 欧美激情艳妇裸体舞| 99精品在线免费| 爽好多水快深点欧美视频| 91麻豆精品久久久久蜜臀| 另类小说图片综合网| 日本一区免费视频| 色一区在线观看| 黄色精品一二区| 国产精品国产a| 制服丝袜亚洲网站| 成人av电影在线播放| 天使萌一区二区三区免费观看| 日韩午夜激情视频| 日本韩国精品在线| 精品亚洲porn| 亚洲mv在线观看| 日韩三级视频在线观看| 粉嫩欧美一区二区三区高清影视 | 成人高清伦理免费影院在线观看| 夜夜爽夜夜爽精品视频| 国产精品免费观看视频| 欧美一区二区视频在线观看2022| 国产999精品久久| 奇米色一区二区三区四区| 一区二区三区成人在线视频| 久久久蜜桃精品| 精品久久国产97色综合| 欧美性色综合网| 色婷婷av一区二区三区之一色屋| 国产精品综合网| 毛片基地黄久久久久久天堂| 亚洲一区二区三区不卡国产欧美| 国产偷国产偷亚洲高清人白洁| 在线一区二区视频| 91女人视频在线观看| 色哟哟亚洲精品| 欧美在线三级电影| 欧美日韩一级片在线观看| 日本精品裸体写真集在线观看| 99久久er热在这里只有精品15| 国产不卡一区视频| av成人动漫在线观看| 美女一区二区视频| 日韩黄色小视频| 麻豆久久一区二区| 国产一区二区伦理片| 国产成人午夜视频| 99精品久久只有精品| 欧美日韩一区二区欧美激情| 91精品国产综合久久香蕉麻豆| 日韩精品一区二区三区视频在线观看| 欧美日韩高清一区二区不卡| 91精品国产福利| 亚洲国产电影在线观看| 亚洲一区二区免费视频| 国产乱理伦片在线观看夜一区| 国产中文一区二区三区| 色视频成人在线观看免| 7777精品伊人久久久大香线蕉最新版|