YSTest
PreAlpha_b400_20130424
The YSLib Test Project
|
图形处理。 更多...
类 | |
class | FontFamily |
字型家族 (Typeface Family) 标识。 更多... | |
class | Typeface |
字型标识。 更多... | |
class | CharBitmap |
字符位图。 更多... | |
class | FontCache |
字体缓存。 更多... | |
class | Font |
字体:字模,包含字型、样式和大小。 更多... | |
class | GBinaryGroup |
屏幕二元组。 更多... | |
class | Size |
屏幕区域大小。 更多... | |
class | Rect |
屏幕标准矩形:表示屏幕矩形区域。 更多... | |
class | Graphics |
二维图形接口上下文。 更多... | |
struct | PaintContext |
class | PenStyle |
笔样式:字体和笔颜色。 更多... | |
class | TextState |
文本状态。 更多... | |
class | EmptyTextRenderer |
空文本渲染器。 更多... | |
class | GTextRendererBase |
文本渲染器静态多态基类模板。 更多... | |
class | TextRenderer |
文本渲染器。 更多... | |
class | TextRegion |
文本区域。 更多... | |
struct | PixelFiller |
像素填充器。 更多... | |
struct | SequenceTransformer |
序列转换器。 更多... | |
struct | VerticalLineTransfomer |
竖直线转换器。 更多... | |
struct | RectTransformer |
标准矩形转换器。 更多... | |
struct | BlitLoop |
循环:按指定扫描顺序复制一块矩形区域的像素。 更多... | |
struct | BlitTransparentLoop |
循环:按指定扫描顺序复制一块矩形区域的像素。 更多... | |
struct | BlitBlendLoop |
循环:按指定扫描顺序复制一块矩形区域的像素。 更多... | |
struct | Padding |
空白样式。 更多... | |
class | BitmapBuffer |
标准矩形位图缓冲区。 更多... | |
class | BitmapBufferEx |
扩展的标准矩形位图缓冲区。 更多... | |
class | Image |
图像资源。 更多... | |
struct | hsl_t |
HSL 颜色。 更多... | |
类型定义 | |
typedef u8 | FontSize |
字体大小。 | |
typedef std::string | FontPath |
字体文件路径。 | |
typedef std::string | FamilyName |
字型家族名称。 | |
typedef std::string | StyleName |
字型样式名称。 | |
typedef GBinaryGroup< SPos > | Point |
屏幕二维点(直角坐标表示)。 | |
typedef GBinaryGroup< SPos > | Vec |
屏幕二维向量(直角坐标表示)。 | |
typedef ystdex::pair_iterator < ConstBitmapPtr, const u8 * > | IteratorPair |
Alpha 光栅化源迭代器对。 | |
typedef ystdex::pair_iterator < ystdex::pseudo_iterator < const PixelType >, const u8 * > | MonoIteratorPair |
Alpha 单色光栅化源迭代器对。 | |
typedef ystdex::fixed_point < u16, 9 > | Hue |
色调。 | |
枚举 | |
enum | FontStyle : u8 |
字体样式。 更多... | |
enum | Rotation { RDeg0 = 0, RDeg90 = 1, RDeg180 = 2, RDeg270 = 3 } |
逆时针旋转角度指示输出指向。 更多... | |
enum | Orientation { Horizontal = 0, Vertical = 1 } |
二元方向。 更多... | |
函数 | |
yconstfn FontStyle | operator& (FontStyle _x, FontStyle _y) |
yconstfn FontStyle | operator| (FontStyle _x, FontStyle _y) |
yconstfn FontStyle | operator^ (FontStyle _x, FontStyle _y) |
yconstfn FontStyle | operator~ (FontStyle _x) |
FontStyle & | operator&= (FontStyle &_x, FontStyle _y) |
FontStyle & | operator|= (FontStyle &_x, FontStyle _y) |
FontStyle & | operator^= (FontStyle &_x, FontStyle _y) |
yconstfn const char * | FetchName (FontStyle style) ynothrow |
取样式名称。 | |
YF_API const Typeface & | FetchDefaultTypeface () ythrow(LoggedEvent) |
取默认字型引用。 | |
template<typename _type > | |
yconstfn bool | operator== (const GBinaryGroup< _type > &a, const GBinaryGroup< _type > &b) ynothrow |
比较:屏幕二元组相等关系。 | |
template<typename _type > | |
yconstfn bool | operator!= (const GBinaryGroup< _type > &a, const GBinaryGroup< _type > &b) ynothrow |
比较:屏幕二元组不等关系。 | |
template<typename _type > | |
yconstfn GBinaryGroup< _type > | operator+ (const GBinaryGroup< _type > &a, const GBinaryGroup< _type > &b) ynothrow |
加法:屏幕二元组。 | |
template<typename _type > | |
yconstfn GBinaryGroup< _type > | operator- (const GBinaryGroup< _type > &a, const GBinaryGroup< _type > &b) ynothrow |
减法:屏幕二元组。 | |
template<typename _type , typename _tScalar > | |
yconstfn GBinaryGroup< _type > | operator* (const GBinaryGroup< _type > &val, _tScalar l) ynothrow |
数乘:屏幕二元组。 | |
yconstfn bool | operator== (const Size &a, const Size &b) ynothrow |
比较:屏幕区域大小相等关系。 | |
yconstfn bool | operator!= (const Size &a, const Size &b) ynothrow |
比较:屏幕区域大小不等关系。 | |
template<typename _type > | |
yconstfn GBinaryGroup< _type > | operator+ (GBinaryGroup< _type > val, const Size &s) ynothrow |
加法:使用屏幕二元组和屏幕区域大小分量对应相加构造屏幕二元组。 | |
template<class _tBinary > | |
yconstfn _tBinary | Transpose (_tBinary &obj) ynothrow |
二元对象转置。 | |
yconstfn auto | GetAreaOf (const Size &s) ynothrow-> decltype(s.Width *s.Height) |
取面积。 | |
yconstfn bool | operator== (const Rect &x, const Rect &y) ynothrow |
比较:屏幕标准矩形相等关系。 | |
yconstfn bool | operator!= (const Rect &x, const Rect &y) ynothrow |
比较:屏幕标准矩形不等关系。 | |
yconstfn Rect | operator+ (const Rect &r, const Vec &v) ynothrow |
加法:使用标准矩形 r 和偏移向量 v 构造屏幕标准矩形。 | |
yconstfn Rect | operator- (const Rect &r, const Vec &v) ynothrow |
减法:使用标准矩形 r 和偏移向量的加法逆元 v 构造屏幕标准矩形。 | |
Rect | operator& (const Rect &, const Rect &) ynothrow |
求两个屏幕标准矩形的交。 | |
Rect | operator| (const Rect &, const Rect &) ynothrow |
求两个屏幕标准矩形的并。 | |
template<template< bool > class _gBlitLoop, typename _tOut , typename _tIn > | |
void | BlitChar (_tOut dst, _tIn src, const Size &ss, const PaintContext &pc) |
字符块传输。 | |
YF_API void | RenderChar (PaintContext &&pc, Color, CharBitmap::BufferType, const Size &) |
渲染单个字符。 | |
YF_API void | RenderCharAlpha (PaintContext &&pc, Color, CharBitmap::BufferType, const Size &, u8 *) |
渲染带 Alpha 缓冲的单个字符。 | |
template<class _tRenderer > | |
SDst | GetEndOfLinePositionOf (const _tRenderer &r) |
取文本渲染器的行末位置(横坐标)。 | |
template<class _tRenderer > | |
void | PrintChar (_tRenderer &r, ucs4_t c) |
打印单个可打印字符。 | |
YF_API u8 | PutCharBase (TextState &, SDst, ucs4_t) |
使用指定的文本状态和行末位置(横坐标)打印并判断是否需要具体渲染单个字符。 | |
template<class _tRenderer > | |
u8 | PutChar (_tRenderer &r, ucs4_t c) |
打印单个字符。 | |
yconstexpr Padding | DefaultMargin (2, 2, 2, 2) |
默认边距。 | |
SDst | GetTextLineHeightOf (const TextState &ts) |
取当前指定文本状态的字体设置对应的行高。 | |
SDst | GetTextLineHeightExOf (const TextState &ts) |
取当前指定文本状态的字体设置对应的行高与行距之和。 | |
u16 | GetCurrentTextLineNOf (const TextState &ts) |
取笔所在的当前行数。 | |
SPos | GetTextLineBaseOf (const TextState &ts) |
取第一行的基线位置(纵坐标)。 | |
void | SetPenOf (TextState &ts, SPos x, SPos y) |
设置笔位置。 | |
YF_API void | SetCurrentTextLineNOf (TextState &, u16) |
设置笔的行位置。 | |
void | AdjustEndOfLine (TextState &ts, const Rect &r, SDst w) |
按指定显示区域和文本区域的宽重新设置右边距。 | |
void | CarriageReturn (TextState &ts) |
回车。 | |
YF_API void | MovePen (TextState &, ucs4_t) |
按字符跨距移动笔。 | |
YF_API SDst | FetchResizedBottomMargin (const TextState &, SDst) |
取指定文本状态和文本区域高调整的底边距。 | |
YF_API u16 | FetchResizedLineN (const TextState &ts, SDst) |
取指定文本状态和文本区域高所能显示的最大文本行数。 | |
YF_API SPos | FetchLastLineBasePosition (const TextState &, SDst) |
取指定文本状态在指定高的区域中表示的最底行的基线位置(纵坐标)。 | |
SDst | FetchResizedBottomMargin (const TextRegion &tr) |
取按字体高度和行距调整文本区域的底边距。 | |
SDst | AdjustBottomMarginOf (TextRegion &tr) |
按字体高度和行距调整文本区域的底边距。 | |
YF_API SDst | FetchCharWidth (const Font &, ucs4_t) |
取指定的字符使用指定字体的显示宽度。 | |
template<typename _tIn > | |
SDst | FetchStringWidth (const Font &fnt, _tIn s) |
取迭代器指定的字符串在字体指定、无边界限制时的显示宽度。 | |
template<typename _tIn > | |
SDst | FetchStringWidth (const Font &fnt, _tIn s, _tIn g, ucs4_t c={}) |
取迭代器指定的单行字符串在字体指定、无边界限制时的显示宽度。 | |
SDst | FetchStringWidth (const Font &fnt, const String &str) |
取单行字符串在字体指定、无边界限制时的显示宽度。 | |
template<typename _tIn > | |
SDst | FetchStringWidth (TextState &ts, SDst h, _tIn s) |
取迭代器指定的单行字符串在指定文本状态和高度限制时的显示宽度。 | |
template<typename _tIn > | |
SDst | FetchStringWidth (TextState &ts, SDst h, _tIn s, _tIn g, ucs4_t c={}) |
取迭代器指定的单行字符串在指定文本状态和高度限制时的显示宽度。 | |
SDst | FetchStringWidth (TextState &ts, SDst h, const String &str) |
取单行字符串在指定文本状态和高度限制时的显示宽度。 | |
template<typename _tIn > | |
SDst | FetchMaxTextWidth (const Font &font, _tIn first, _tIn last) |
取指定字体显示的迭代器范围中的文本的最大宽度。 | |
template<typename _tIn , class _tRenderer > | |
_tIn | PrintLine (_tRenderer &r, _tIn s) |
打印迭代器指定的字符串,直至行尾或字符迭代终止。 | |
template<typename _tIn , class _tRenderer > | |
_tIn | PrintLine (_tRenderer &r, _tIn s, _tIn g, ucs4_t c={}) |
打印迭代器指定的字符串,直至行尾或字符迭代终止。 | |
template<class _tRenderer > | |
String::size_type | PrintLine (_tRenderer &r, const String &str) |
打印字符串,直至行尾或字符串结束。 | |
template<typename _tIn , class _tRenderer > | |
_tIn | PutLine (_tRenderer &r, _tIn s) |
打印迭代器指定的字符串,直至行尾或字符迭代终止。 | |
template<typename _tIn , class _tRenderer > | |
_tIn | PutLine (_tRenderer &r, _tIn s, _tIn g, ucs4_t c={}) |
打印迭代器指定的字符串,直至行尾或字符迭代终止。 | |
template<class _tRenderer > | |
String::size_type | PutLine (_tRenderer &r, const String &str) |
打印字符串,直至行尾或字符串结束。 | |
template<typename _tIn , class _tRenderer > | |
_tIn | PrintString (_tRenderer &r, _tIn s) |
打印迭代器指定的字符串,直至区域末尾或字符迭代终止。 | |
template<typename _tIn , class _tRenderer > | |
_tIn | PrintString (_tRenderer &r, _tIn s, _tIn g, ucs4_t c={}) |
打印迭代器指定的字符串,直至区域末尾或字符迭代终止。 | |
template<class _tRenderer > | |
String::size_type | PrintString (_tRenderer &r, const String &str) |
打印字符串,直至区域末尾或字符串结束。 | |
template<typename _tIn , class _tRenderer > | |
_tIn | PutString (_tRenderer &r, _tIn s) |
打印迭代器指定的字符串,直至区域末尾或字符迭代终止。 | |
template<typename _tIn , class _tRenderer > | |
_tIn | PutString (_tRenderer &r, _tIn s, _tIn g, ucs4_t c={}) |
打印迭代器指定的字符串,直至区域末尾或字符迭代终止。 | |
template<class _tRenderer > | |
String::size_type | PutString (_tRenderer &r, const String &str) |
打印字符串,直至区域末尾或字符串结束。 | |
YF_API void | DrawClippedText (const Graphics &g, const Rect &mask, TextState &ts, const String &str, bool line_wrap) |
绘制剪切区域的文本。 | |
YF_API void | DrawClippedText (const Graphics &g, const Rect &mask, const Rect &bounds, const String &str, const Padding &m, Color, bool line_wrap, const Font &fnt={}) |
绘制剪切区域的文本。 | |
YF_API void | DrawText (const Graphics &g, TextState &ts, const String &str, bool line_wrap) |
绘制文本。 | |
YF_API void | DrawText (const Graphics &g, const Rect &bounds, const String &str, const Padding &m, Color, bool line_wrap, const Font &fnt={}) |
绘制文本。 | |
YF_API void | DrawText (TextRegion &r, const Graphics &g, const Point &pt, const Size &s, const String &str, bool line_wrap) |
绘制文本。 | |
YF_API bool | BlitBounds (const Point &dp, const Point &sp, const Size &ds, const Size &ss, const Size &cs, int &min_x, int &min_y, int &delta_x, int &delta_y) |
贴图边界计算器。 | |
template<bool _bDec, typename _fCallable , typename _tScalar , typename _tDiff , typename _tOut , typename _tIn > | |
void | BlitScan (_fCallable &&f, _tScalar d_width, _tScalar s_width, _tDiff delta_x, _tDiff delta_y, _tOut dst, _tIn src) |
贴图扫描函数模板。 | |
template<template< bool > class _gBlitLoop, bool _bSwapLR, bool _bSwapUD, typename _tOut , typename _tIn > | |
void | Blit (_tOut dst, const Size &ds, _tIn src, const Size &ss, const Point &dp, const Point &sp, const Size &sc) |
贴图函数模板。 | |
template<typename _tPixel > | |
_tPixel * | ClearPixel (_tPixel *dst, size_t n) ynothrow |
清除指定位置的 n 个连续像素。 | |
template<typename _tPixel > | |
void | FillPixel (_tPixel *dst, size_t n, _tPixel c) |
使用 n 个指定像素连续填充指定位置。 | |
template<typename _tPixel > | |
void | FillVerticalLine (_tPixel *dst, size_t n, SDst dw, _tPixel c) |
使用 n 个指定像素竖直填充指定位置。 | |
template<typename _tPixel > | |
void | FillRect (_tPixel *dst, const Size &ds, const Point &sp, const Size &ss, _tPixel c) |
使用指定像素填充指定的标准矩形区域。 | |
template<typename _tPixel > | |
void | FillRect (_tPixel *dst, const Size &ds, const Rect &rSrc, _tPixel c) |
使用指定像素填充指定的标准矩形区域。 | |
template<typename _tPixel > | |
void | FillRect (_tPixel *dst, SDst dw, SDst dh, SPos sx, SPos sy, SDst sw, SDst sh, _tPixel c) |
使用指定像素填充指定的标准矩形区域。 | |
yconstexpr u8 | BLT_ALPHA_BITS (8) |
yconstexpr u32 | BLT_MAX_ALPHA ((1<< BLT_ALPHA_BITS)-1) |
yconstexpr u32 | BLT_ROUND (1<< (BLT_ALPHA_BITS-1)) |
yconstexpr u8 | BLT_THRESHOLD (8) |
yconstexpr u8 | BLT_THRESHOLD2 (128) |
yconstexpr u32 | BLT_ROUND_BR (BLT_ROUND|BLT_ROUND<< 16) |
u8 | component_blend (u8 d, u8 s, u8 a) |
PixelType | blitAlphaBlend (PixelType d, PixelType s, u8 a) |
template<typename _tOut , typename _tIn > | |
void | biltAlphaPoint (_tOut dst_iter, _tIn src_iter) |
template<> | |
void | biltAlphaPoint (PixelType *dst_iter, IteratorPair src_iter) |
template<class _fTransformPixel > | |
bool | TransformRect (const Graphics &g, const Point &pt, const Size &s, _fTransformPixel tp) |
以像素为单位变换标准矩形。 | |
template<class _fTransformPixel > | |
bool | TransformRect (const Graphics &g, const Rect &r, _fTransformPixel tp) |
以像素为单位变换标准矩形。 | |
YF_API void | CopyBuffer (const Graphics &, const Graphics &) |
以第一个参数作为目标,复制第二个参数的缓冲区内容。 | |
YF_API void | ClearImage (const Graphics &) |
清除图形接口上下文缓冲区。 | |
YF_API void | Fill (const Graphics &, Color) |
使用指定颜色填充图形接口上下文缓冲区。 | |
void | PutPixel (BitmapPtr dst, SDst w, SPos x, SPos y, Color c) |
绘制像素:(x, y) 。 | |
void | PutPixel (const Graphics &g, SPos x, SPos y, Color c) |
绘制像素:(x, y) 。 | |
bool | PlotPixel (BitmapPtr dst, const Size &s, SPos x, SPos y, Color c) |
绘制像素:(x, y) 。 | |
bool | DrawPoint (const Graphics &g, SPos x, SPos y, Color c) |
绘制点:(x, y) 。 | |
bool | DrawPoint (const Graphics &g, const Point &pt, Color c) |
绘制点:pt 。 | |
YF_API bool | DrawHLineSeg (const Graphics &g, SPos y, SPos x1, SPos x2, Color c) |
绘制水平线段:指定端点水平坐标 x1 、 x2 - 1 ,竖直坐标 y 。 | |
YF_API bool | DrawVLineSeg (const Graphics &g, SPos x, SPos y1, SPos y2, Color c) |
绘制竖直线段:指定竖直水平坐标 x ,竖直坐标 y1 - 1 、 y2 。 | |
YF_API bool | DrawLineSeg (const Graphics &g, SPos x1, SPos y1, SPos x2, SPos y2, Color c) |
绘制一般线段:端点 p1(x1, y1) 和 p2(x2, y2) 。 | |
bool | DrawLineSeg (const Graphics &g, const Point &p1, const Point &p2, Color c) |
绘制一般线段:端点 p1, p2 。 | |
YF_API bool | DrawRect (const Graphics &g, const Point &pt, const Size &s, Color c) |
绘制空心标准矩形。 | |
bool | DrawRect (const Graphics &g, const Rect &r, Color c) |
绘制空心标准矩形。 | |
YF_API bool | FillRect (const Graphics &g, const Point &pt, const Size &s, Color c) |
绘制实心标准矩形。 | |
bool | FillRect (const Graphics &g, const Rect &r, Color c) |
绘制实心标准矩形。 | |
YF_API bool | DrawCircle (const Graphics &, const Point &, SDst, Color c) |
绘制圆形。 | |
yconstfn Padding | operator+ (const Padding &x, const Padding &y) |
加法:对应分量调用 operator+ 。 | |
YF_API Rect | operator+ (const Rect &, const Padding &) |
加法:缩小屏幕标准矩形,相对位置由指定边距决定。 | |
SDst | GetHorizontalOf (const Padding &m) |
取水平边距和。 | |
SDst | GetVerticalOf (const Padding &m) |
取竖直边距和。 | |
YF_API Padding | FetchMargin (const Rect &, const Size &) |
取内边界相对于外边界的边距。 | |
bool | Clip (Rect &x, const Rect &y) |
剪切操作:取标准矩形交集并判断是否严格非空。 | |
YF_API Point | ClipBounds (Rect &, const Rect &) |
根据指定源的边界优化绘制上下文的剪切区域。 | |
YF_API Point | ClipMargin (PaintContext &, const Padding &, const Size &) |
根据指定边距和源的大小优化绘制上下文的剪切区域。 | |
YF_API bool | CopyTo (BitmapPtr, const Graphics &, const Size &, const Point &, const Point &, const Size &, Rotation=RDeg0) |
图形接口上下文向指针指定的缓冲区复制。 | |
YF_API bool | CopyTo (BitmapPtr, const BitmapBufferEx &, const Size &, const Point &, const Point &, const Size &, Rotation=RDeg0) |
刷新:位图缓冲区向指针指定的缓冲区复制。 | |
bool | CopyTo (const Graphics &dst, const Graphics &src, const Point &dp={}, const Point &sp={}, Rotation rot=RDeg0) |
图形接口上下文复制。 | |
bool | CopyTo (const Graphics &dst, const BitmapBufferEx &src, const Point &dp={}, const Point &sp={}, Rotation rot=RDeg0) |
刷新:位图缓冲区向图形接口上下文复制。 | |
YF_API bool | BlitTo (BitmapPtr, const BitmapBufferEx &, const Size &, const Point &, const Point &, const Size &, Rotation=RDeg0) |
贴图:位图缓冲区向指针指定的缓冲区以贴图算法复制。 | |
bool | BlitTo (const Graphics &dst, const BitmapBufferEx &src, const Point &dp={}, const Point &sp={}, Rotation rot=RDeg0) |
贴图:位图缓冲区向指针指定的缓冲区以贴图算法复制。 | |
YF_API bool | DrawRectRoundCorner (const Graphics &, const Point &, const Size &, Color) |
绘制部件边框用空心标准矩形。 | |
YF_API void | RectDrawArrow (const Graphics &, const Point &, SDst, Rotation=RDeg0, Color c=ColorSpace::Black) |
在指定图形接口上下文的矩形上画箭头。 | |
YF_API void | DrawArrow (const Graphics &, const Rect &, SDst=4, Rotation=RDeg0, Color=ColorSpace::Black) |
在指定图形接口上下文上画箭头。 | |
YF_API void | DrawCross (const Graphics &, const Point &, const Size &, Color) |
在指定图形接口上下文中的指定点为边框左上角使用指定颜色绘制交叉直线段(“×”)。 | |
template<Color::MonoType r, Color::MonoType g, Color::MonoType b> | |
void | transform_pixel_ex (BitmapPtr dst) |
矩形区域颜色转换。 | |
YF_API hsl_t | ColorToHSL (Color) |
RGB 颜色转换为 HSL 颜色。 | |
YF_API Color | HSLToColor (hsl_t) |
HSL 颜色转换为 RGB 颜色。 | |
template<bool _bSwapLR, bool _bSwapUD> | |
int | BlitScale (const Point &dp, const Size &ds, int delta_x, int delta_y) |
贴图偏移量计算器。 | |
template<> | |
YF_API int | BlitScale< false, false > (const Point &, const Size &, int, int) |
template<> | |
YF_API int | BlitScale< true, false > (const Point &, const Size &, int, int) |
template<> | |
YF_API int | BlitScale< false, true > (const Point &, const Size &, int, int) |
template<> | |
YF_API int | BlitScale< true, true > (const Point &, const Size &, int, int) |
template<bool _bPositiveScan> | |
void | BlitLine (BitmapPtr &dst_iter, ConstBitmapPtr &src_iter, int delta_x) |
循环:按指定扫描顺序复制一行像素。 | |
template<> | |
void | BlitLine< false > (BitmapPtr &dst_iter, ConstBitmapPtr &src_iter, int delta_x) |
图形处理。
typedef std::string YSLib::Drawing::FamilyName |
typedef std::string YSLib::Drawing::FontPath |
typedef u8 YSLib::Drawing::FontSize |
typedef ystdex::fixed_point<u16, 9> YSLib::Drawing::Hue |
typedef ystdex::pair_iterator<ConstBitmapPtr, const u8*> YSLib::Drawing::IteratorPair |
typedef ystdex::pair_iterator<ystdex::pseudo_iterator<const PixelType>, const u8*> YSLib::Drawing::MonoIteratorPair |
typedef GBinaryGroup<SPos> YSLib::Drawing::Point |
typedef std::string YSLib::Drawing::StyleName |
typedef GBinaryGroup<SPos> YSLib::Drawing::Vec |
enum YSLib::Drawing::FontStyle : u8 |
|
inline |
按字体高度和行距调整文本区域的底边距。
在文件 TextLayout.h 第 81 行定义.
参考 YSLib::Drawing::Padding::Bottom,FetchResizedBottomMargin() , 以及 YSLib::Drawing::TextState::Margin.
参考自 DualScreenReader::AdjustMargins().
|
inline |
按指定显示区域和文本区域的宽重新设置右边距。
在文件 TextBase.h 第 218 行定义.
参考 YSLib::Drawing::TextState::Margin,YSLib::Drawing::Padding::Right,YSLib::Drawing::Size::Width , 以及 YSLib::Drawing::GBinaryGroup< _type >::X.
参考自 YSLib::UI::TextList::DrawItems().
void YSLib::Drawing::biltAlphaPoint | ( | _tOut | dst_iter, |
_tIn | src_iter | ||
) |
|
inline |
void YSLib::Drawing::Blit | ( | _tOut | dst, |
const Size & | ds, | ||
_tIn | src, | ||
const Size & | ss, | ||
const Point & | dp, | ||
const Point & | sp, | ||
const Size & | sc | ||
) |
贴图函数模板。
_gBlitLoop | 循环实现类模板。 |
_bSwapLR | 水平翻转镜像(关于水平中轴对称)。 |
_bSwapUD | 竖直翻转镜像(关于竖直中轴对称)。 |
_tOut | 输出迭代器类型。 |
_tIn | 输入迭代器类型。 |
dst | 目标迭代器。 |
ds | 目标迭代器所在缓冲区大小。 |
src | 源迭代器。 |
ss | 源迭代器所在缓冲区大小。 |
dp | 目标迭代器起始点所在缓冲区偏移。 |
sp | 源迭代器起始点所在缓冲区偏移。 |
sc | 源迭代器需要复制的区域大小。 |
对一块矩形区域逐像素顺序批量操作(如复制或贴图)。
参考 BlitBounds(),YSLib::Drawing::Size::Width,YSLib::Drawing::GBinaryGroup< _type >::X,YSLib::Drawing::GBinaryGroup< _type >::Y , 以及 YB_LIKELY.
|
inline |
YF_API bool YSLib::Drawing::BlitBounds | ( | const Point & | dp, |
const Point & | sp, | ||
const Size & | ds, | ||
const Size & | ss, | ||
const Size & | cs, | ||
int & | min_x, | ||
int & | min_y, | ||
int & | delta_x, | ||
int & | delta_y | ||
) |
贴图边界计算器。
|
inline |
字符块传输。
_gBlitLoop | 循环实现类模板。 |
_tOut | 输出迭代器类型。 |
_tIn | 输入迭代器类型。 |
src | 源迭代器。 |
ss | 源迭代器所在缓冲区大小。 |
pc | 指定字符所在区域和渲染目标的绘制上下文,其中 Location 为相对于源的坐标。 |
在文件 CharRenderer.h 第 52 行定义.
void YSLib::Drawing::BlitLine | ( | BitmapPtr & | dst_iter, |
ConstBitmapPtr & | src_iter, | ||
int | delta_x | ||
) |
|
inline |
int YSLib::Drawing::BlitScale | ( | const Point & | dp, |
const Size & | ds, | ||
int | delta_x, | ||
int | delta_y | ||
) |
贴图偏移量计算器。
YF_API int YSLib::Drawing::BlitScale< false, false > | ( | const Point & | , |
const Size & | , | ||
int | , | ||
int | |||
) |
YF_API int YSLib::Drawing::BlitScale< false, true > | ( | const Point & | , |
const Size & | , | ||
int | , | ||
int | |||
) |
YF_API int YSLib::Drawing::BlitScale< true, false > | ( | const Point & | , |
const Size & | , | ||
int | , | ||
int | |||
) |
YF_API int YSLib::Drawing::BlitScale< true, true > | ( | const Point & | , |
const Size & | , | ||
int | , | ||
int | |||
) |
void YSLib::Drawing::BlitScan | ( | _fCallable && | f, |
_tScalar | d_width, | ||
_tScalar | s_width, | ||
_tDiff | delta_x, | ||
_tDiff | delta_y, | ||
_tOut | dst, | ||
_tIn | src | ||
) |
YF_API bool YSLib::Drawing::BlitTo | ( | BitmapPtr | , |
const BitmapBufferEx & | , | ||
const Size & | , | ||
const Point & | , | ||
const Point & | , | ||
const Size & | , | ||
Rotation | = RDeg0 |
||
) |
贴图:位图缓冲区向指针指定的缓冲区以贴图算法复制。
向指定大小和点(相对左上角)的指定图形接口上下文以指定输出指向以缓冲区内容贴图。
参考自 DrawText().
|
inline |
yconstexpr u8 YSLib::Drawing::BLT_ALPHA_BITS | ( | 8 | ) |
yconstexpr u32 YSLib::Drawing::BLT_MAX_ALPHA | ( | (1<< BLT_ALPHA_BITS)- | 1 | ) |
yconstexpr u32 YSLib::Drawing::BLT_ROUND | ( | 1<< | BLT_ALPHA_BITS-1 | ) |
yconstexpr u32 YSLib::Drawing::BLT_ROUND_BR | ( | BLT_ROUND|BLT_ROUND<< | 16 | ) |
yconstexpr u8 YSLib::Drawing::BLT_THRESHOLD | ( | 8 | ) |
yconstexpr u8 YSLib::Drawing::BLT_THRESHOLD2 | ( | 128 | ) |
|
inline |
回车。
指定文本状态的笔的水平位置移至左端,竖直位置不变。
在文件 TextBase.h 第 231 行定义.
参考 YSLib::Drawing::Padding::Left,YSLib::Drawing::TextState::Margin,YSLib::Drawing::TextState::Pen , 以及 YSLib::Drawing::GBinaryGroup< _type >::X.
参考自 DualScreenReader::Execute(),YSLib::Drawing::TextState::PutNewline(),YSLib::Drawing::TextState::ResetPen() , 以及 DualScreenReader::ScrollByPixel().
YF_API void YSLib::Drawing::ClearImage | ( | const Graphics & | ) |
清除图形接口上下文缓冲区。
|
inline |
清除指定位置的 n 个连续像素。
参考自 ClearImage(),YSLib::Drawing::BitmapBufferEx::ClearImage(),YSLib::Drawing::TextRenderer::ClearLine() , 以及 YSLib::Drawing::TextRegion::ClearLine().
|
inline |
剪切操作:取标准矩形交集并判断是否严格非空。
参考 YSLib::Drawing::Size::IsUnstrictlyEmpty().
参考自 ClipBounds() , 以及 PaintChild().
根据指定源的边界优化绘制上下文的剪切区域。
检查边距限制下需要保留绘制的区域,结果保存至绘制上下文的除渲染目标外的其它成员。
根据指定边距和源的大小优化绘制上下文的剪切区域。
检查边距限制下需要保留绘制的区域,结果保存至绘制上下文的除渲染目标外的其它成员。
|
inline |
YF_API void YSLib::Drawing::CopyBuffer | ( | const Graphics & | , |
const Graphics & | |||
) |
以第一个参数作为目标,复制第二个参数的缓冲区内容。
YF_API bool YSLib::Drawing::CopyTo | ( | BitmapPtr | , |
const Graphics & | , | ||
const Size & | , | ||
const Point & | , | ||
const Point & | , | ||
const Size & | , | ||
Rotation | = RDeg0 |
||
) |
图形接口上下文向指针指定的缓冲区复制。
以指定图形接口上下文作为源,向指定大小和点(相对左上角)的 指定图形接口上下文以指定输出指向复制缓冲区内容。
参考自 YSLib::UI::ImageBrush::operator()(),YSLib::UI::BufferedRenderer::UpdateTo() , 以及 YSLib::UI::BufferedRenderer::Validate().
YF_API bool YSLib::Drawing::CopyTo | ( | BitmapPtr | , |
const BitmapBufferEx & | , | ||
const Size & | , | ||
const Point & | , | ||
const Point & | , | ||
const Size & | , | ||
Rotation | = RDeg0 |
||
) |
刷新:位图缓冲区向指针指定的缓冲区复制。
向指定大小和点(相对左上角)的指定图形接口上下文以指定输出指向复制缓冲区内容。
|
inline |
|
inline |
yconstexpr Padding YSLib::Drawing::DefaultMargin | ( | 2 | , |
2 | , | ||
2 | , | ||
2 | |||
) |
YF_API void YSLib::Drawing::DrawArrow | ( | const Graphics & | , |
const Rect & | , | ||
SDst | = 4 , |
||
Rotation | = RDeg0 , |
||
Color | = ColorSpace::Black |
||
) |
YF_API bool YSLib::Drawing::DrawCircle | ( | const Graphics & | , |
const Point & | , | ||
SDst | , | ||
Color | c | ||
) |
绘制圆形。
YF_API void YSLib::Drawing::DrawClippedText | ( | const Graphics & | g, |
const Rect & | mask, | ||
TextState & | ts, | ||
const String & | str, | ||
bool | line_wrap | ||
) |
绘制剪切区域的文本。
g | 输出图形接口上下文。 |
mask | 相对于输出图形接口上下文矩形,限定输出边界。 |
ts | 输出时使用的文本状态。 |
str | 待绘制的字符串。 |
line_wrap | 自动换行。 |
参考自 DrawClippedText(),YSLib::UI::TextList::DrawItem(),YSLib::UI::MLabel::DrawText() , 以及 DrawText().
YF_API void YSLib::Drawing::DrawClippedText | ( | const Graphics & | g, |
const Rect & | mask, | ||
const Rect & | bounds, | ||
const String & | str, | ||
const Padding & | m, | ||
Color | , | ||
bool | line_wrap, | ||
const Font & | fnt = {} |
||
) |
绘制剪切区域的文本。
g | 输出图形接口上下文。 |
mask | 相对于输出图形接口上下文矩形,限定输出边界。 |
bounds | 绘制区域的外边界。 |
str | 待绘制的字符串。 |
m | 绘制区域边界和外边界之间的边距。 |
line_wrap | 自动换行。 |
fnt | 输出时使用的字体。 |
YF_API void YSLib::Drawing::DrawCross | ( | const Graphics & | , |
const Point & | , | ||
const Size & | , | ||
Color | |||
) |
在指定图形接口上下文中的指定点为边框左上角使用指定颜色绘制交叉直线段(“×”)。
YF_API bool YSLib::Drawing::DrawHLineSeg | ( | const Graphics & | g, |
SPos | y, | ||
SPos | x1, | ||
SPos | x2, | ||
Color | c | ||
) |
绘制水平线段:指定端点水平坐标 x1 、 x2 - 1 ,竖直坐标 y 。
bool(g)
。 YF_API bool YSLib::Drawing::DrawLineSeg | ( | const Graphics & | g, |
SPos | x1, | ||
SPos | y1, | ||
SPos | x2, | ||
SPos | y2, | ||
Color | c | ||
) |
绘制一般线段:端点 p1(x1, y1) 和 p2(x2, y2) 。
|
inline |
绘制一般线段:端点 p1, p2 。
参考 DrawLineSeg(),YSLib::Drawing::GBinaryGroup< _type >::X , 以及 YSLib::Drawing::GBinaryGroup< _type >::Y.
|
inline |
绘制点:(x, y) 。
参考 YSLib::Drawing::Graphics::GetBufferPtr(),YSLib::Drawing::Graphics::GetSize(),PlotPixel() , 以及 YB_LIKELY.
参考自 DrawPoint() , 以及 DrawRectRoundCorner().
|
inline |
绘制点:pt 。
参考 DrawPoint(),YSLib::Drawing::GBinaryGroup< _type >::X , 以及 YSLib::Drawing::GBinaryGroup< _type >::Y.
YF_API bool YSLib::Drawing::DrawRect | ( | const Graphics & | g, |
const Point & | pt, | ||
const Size & | s, | ||
Color | c | ||
) |
绘制空心标准矩形。
|
inline |
绘制空心标准矩形。
参考 DrawRect(),YSLib::Drawing::Rect::GetPoint() , 以及 YSLib::Drawing::Rect::GetSize().
YF_API bool YSLib::Drawing::DrawRectRoundCorner | ( | const Graphics & | , |
const Point & | , | ||
const Size & | , | ||
Color | |||
) |
绘制部件边框用空心标准矩形。
YF_API void YSLib::Drawing::DrawText | ( | const Graphics & | g, |
TextState & | ts, | ||
const String & | str, | ||
bool | line_wrap | ||
) |
绘制文本。
g | 输出图形接口上下文。 |
ts | 输出时使用的文本状态。 |
str | 待绘制的字符串。 |
line_wrap | 自动换行。 |
参考自 ShlExplorer::OnPaint(),YSLib::UI::Label::Refresh() , 以及 YSLib::UI::Button::Refresh().
YF_API void YSLib::Drawing::DrawText | ( | const Graphics & | g, |
const Rect & | bounds, | ||
const String & | str, | ||
const Padding & | m, | ||
Color | , | ||
bool | line_wrap, | ||
const Font & | fnt = {} |
||
) |
绘制文本。
g | 输出图形接口上下文。 |
bounds | 绘制区域的外边界。 |
str | 待绘制的字符串。 |
m | 绘制区域边界和外边界之间的边距。 |
line_wrap | 自动换行。 |
fnt | 输出时使用的字体。 |
YF_API void YSLib::Drawing::DrawText | ( | TextRegion & | r, |
const Graphics & | g, | ||
const Point & | pt, | ||
const Size & | s, | ||
const String & | str, | ||
bool | line_wrap | ||
) |
绘制文本。
r | 文本区域。 |
g | 输出图形接口上下文。 |
pt | 绘制区域左上角相对于图形接口上下文的位置偏移。 |
s | 绘制区域大小。 |
str | 待绘制的字符串。 |
line_wrap | 自动换行。 |
YF_API bool YSLib::Drawing::DrawVLineSeg | ( | const Graphics & | g, |
SPos | x, | ||
SPos | y1, | ||
SPos | y2, | ||
Color | c | ||
) |
绘制竖直线段:指定竖直水平坐标 x ,竖直坐标 y1 - 1 、 y2 。
bool(g)
。 YF_API SDst YSLib::Drawing::FetchCharWidth | ( | const Font & | , |
ucs4_t | |||
) |
取指定的字符使用指定字体的显示宽度。
取默认字型引用。
LoggedEvent | 记录异常事件。 |
参考 FetchDefaultFontCache() , 以及 YB_UNLIKELY.
YF_API SPos YSLib::Drawing::FetchLastLineBasePosition | ( | const TextState & | , |
SDst | |||
) |
取指定文本状态在指定高的区域中表示的最底行的基线位置(纵坐标)。
SDst YSLib::Drawing::FetchMaxTextWidth | ( | const Font & | font, |
_tIn | first, | ||
_tIn | last | ||
) |
取指定字体显示的迭代器范围中的文本的最大宽度。
在文件 TextLayout.h 第 185 行定义.
参考自 YSLib::UI::MTextList::GetMaxTextWidth().
yconstfn const char* YSLib::Drawing::FetchName | ( | FontStyle | style | ) |
YF_API SDst YSLib::Drawing::FetchResizedBottomMargin | ( | const TextState & | , |
SDst | |||
) |
取指定文本状态和文本区域高调整的底边距。
GetTextLineHeightExOf(ts) != 0
。 ts.Margin.Bottom
不小于原值。
|
inline |
取指定文本状态和文本区域高所能显示的最大文本行数。
GetTextLineHeightExOf(ts) != 0
。 SDst YSLib::Drawing::FetchStringWidth | ( | const Font & | fnt, |
_tIn | s | ||
) |
取迭代器指定的字符串在字体指定、无边界限制时的显示宽度。
在文件 TextLayout.h 第 103 行定义.
参考 FetchCharWidth() , 以及 w.
参考自 YSLib::UI::MLabel::DrawText(),FetchMaxTextWidth() , 以及 FetchStringWidth().
SDst YSLib::Drawing::FetchStringWidth | ( | const Font & | fnt, |
_tIn | s, | ||
_tIn | g, | ||
ucs4_t | c = {} |
||
) |
取迭代器指定的单行字符串在字体指定、无边界限制时的显示宽度。
在文件 TextLayout.h 第 118 行定义.
|
inline |
SDst YSLib::Drawing::FetchStringWidth | ( | TextState & | ts, |
SDst | h, | ||
_tIn | s | ||
) |
取迭代器指定的单行字符串在指定文本状态和高度限制时的显示宽度。
在文件 TextLayout.h 第 143 行定义.
参考 YSLib::Drawing::TextState::Pen,PrintString() , 以及 YSLib::Drawing::GBinaryGroup< _type >::X.
SDst YSLib::Drawing::FetchStringWidth | ( | TextState & | ts, |
SDst | h, | ||
_tIn | s, | ||
_tIn | g, | ||
ucs4_t | c = {} |
||
) |
取迭代器指定的单行字符串在指定文本状态和高度限制时的显示宽度。
在文件 TextLayout.h 第 159 行定义.
|
inline |
YF_API void YSLib::Drawing::Fill | ( | const Graphics & | , |
Color | |||
) |
使用指定颜色填充图形接口上下文缓冲区。
|
inline |
YF_API bool YSLib::Drawing::FillRect | ( | const Graphics & | g, |
const Point & | pt, | ||
const Size & | s, | ||
Color | c | ||
) |
绘制实心标准矩形。
|
inline |
绘制实心标准矩形。
参考 FillRect(),YSLib::Drawing::Rect::GetPoint() , 以及 YSLib::Drawing::Rect::GetSize().
|
inline |
|
inline |
|
inline |
|
inline |
取面积。
在文件 ygdibase.h 第 390 行定义.
参考自 ClearImage(),YSLib::Drawing::BitmapBufferEx::ClearImage(),CopyBuffer(),Fill(),YSLib::Drawing::BitmapBuffer::SetContent(),YSLib::Drawing::BitmapBuffer::SetSize(),YSLib::Drawing::BitmapBufferEx::SetSize() , 以及 YSLib::Devices::Screen::Update().
|
inline |
取笔所在的当前行数。
在文件 TextBase.h 第 178 行定义.
参考 GetTextLineHeightExOf(),YSLib::Drawing::TextState::Margin,YSLib::Drawing::TextState::Pen,YSLib::Drawing::Padding::Top , 以及 YSLib::Drawing::GBinaryGroup< _type >::Y.
|
inline |
|
inline |
取水平边距和。
参考 YSLib::Drawing::Padding::Left , 以及 YSLib::Drawing::Padding::Right.
参考自 ClipMargin(),YSLib::UI::MLabel::DrawText(),HexViewArea::Refresh(),ResizeForContent() , 以及 YSLib::UI::ListBox::ResizeForPreferred().
|
inline |
取第一行的基线位置(纵坐标)。
在文件 TextBase.h 第 188 行定义.
参考 YSLib::Drawing::PenStyle::Font,YSLib::Drawing::Font::GetAscender(),YSLib::Drawing::TextState::Margin , 以及 YSLib::Drawing::Padding::Top.
参考自 YSLib::Drawing::TextState::ResetPen() , 以及 SetCurrentTextLineNOf().
|
inline |
取当前指定文本状态的字体设置对应的行高与行距之和。
在文件 TextBase.h 第 168 行定义.
参考 YSLib::Drawing::PenStyle::Font,YSLib::Drawing::Font::GetHeight() , 以及 YSLib::Drawing::TextState::LineGap.
参考自 DualScreenReader::AdjustScrollOffset(),YSLib::Drawing::TextRegion::ClearTextLine(),FetchLastLineBasePosition(),FetchResizedBottomMargin(),FetchResizedLineN(),GetCurrentTextLineNOf(),YSLib::Drawing::TextState::PutNewline(),DualScreenReader::ScrollByPixel() , 以及 SetCurrentTextLineNOf().
|
inline |
取当前指定文本状态的字体设置对应的行高。
在文件 TextBase.h 第 158 行定义.
参考 YSLib::Drawing::PenStyle::Font , 以及 YSLib::Drawing::Font::GetHeight().
参考自 YSLib::UI::MLabel::DrawText().
|
inline |
取竖直边距和。
参考 YSLib::Drawing::Padding::Bottom , 以及 YSLib::Drawing::Padding::Top.
参考自 ClipMargin(),YSLib::UI::MLabel::DrawText(),FetchResizedBottomMargin(),FetchResizedLineN() , 以及 YSLib::UI::MTextList::RefreshTextState().
YF_API void YSLib::Drawing::MovePen | ( | TextState & | , |
ucs4_t | |||
) |
按字符跨距移动笔。
yconstfn bool YSLib::Drawing::operator!= | ( | const GBinaryGroup< _type > & | a, |
const GBinaryGroup< _type > & | b | ||
) |
yconstfn bool YSLib::Drawing::operator!= | ( | const Size & | a, |
const Size & | b | ||
) |
yconstfn bool YSLib::Drawing::operator!= | ( | const Rect & | x, |
const Rect & | y | ||
) |
Rect YSLib::Drawing::operator& | ( | const Rect & | , |
const Rect & | |||
) |
yconstfn GBinaryGroup<_type> YSLib::Drawing::operator* | ( | const GBinaryGroup< _type > & | val, |
_tScalar | l | ||
) |
加法:对应分量调用 operator+ 。
参考 YSLib::Drawing::Padding::Bottom,YSLib::Drawing::Padding::Left,YSLib::Drawing::Padding::Right , 以及 YSLib::Drawing::Padding::Top.
加法:缩小屏幕标准矩形,相对位置由指定边距决定。
yconstfn GBinaryGroup<_type> YSLib::Drawing::operator+ | ( | const GBinaryGroup< _type > & | a, |
const GBinaryGroup< _type > & | b | ||
) |
yconstfn GBinaryGroup<_type> YSLib::Drawing::operator+ | ( | GBinaryGroup< _type > | val, |
const Size & | s | ||
) |
yconstfn GBinaryGroup<_type> YSLib::Drawing::operator- | ( | const GBinaryGroup< _type > & | a, |
const GBinaryGroup< _type > & | b | ||
) |
yconstfn bool YSLib::Drawing::operator== | ( | const GBinaryGroup< _type > & | a, |
const GBinaryGroup< _type > & | b | ||
) |
yconstfn bool YSLib::Drawing::operator== | ( | const Size & | a, |
const Size & | b | ||
) |
yconstfn bool YSLib::Drawing::operator== | ( | const Rect & | x, |
const Rect & | y | ||
) |
Rect YSLib::Drawing::operator| | ( | const Rect & | , |
const Rect & | |||
) |
|
inline |
绘制像素:(x, y) 。
参考 Contains(),PutPixel() , 以及 YSLib::Drawing::Size::Width.
参考自 DrawPoint().
void YSLib::Drawing::PrintChar | ( | _tRenderer & | r, |
ucs4_t | c | ||
) |
打印单个可打印字符。
在文件 CharRenderer.h 第 101 行定义.
参考 YB_LIKELY.
参考自 PrintLine() , 以及 PrintString().
_tIn YSLib::Drawing::PrintLine | ( | _tRenderer & | r, |
_tIn | s | ||
) |
打印迭代器指定的字符串,直至行尾或字符迭代终止。
r | 使用的字符渲染器。 |
s | 指向字符串起始字符的输入迭代器。 |
在文件 TextRenderer.h 第 48 行定义.
参考 PrintChar().
参考自 PrintLine().
_tIn YSLib::Drawing::PrintLine | ( | _tRenderer & | r, |
_tIn | s, | ||
_tIn | g, | ||
ucs4_t | c = {} |
||
) |
打印迭代器指定的字符串,直至行尾或字符迭代终止。
r | 使用的字符渲染器。 |
s | 指向字符串起始字符的输入迭代器。 |
g | 指示迭代终止位置的输入迭代器。 |
c | 指向迭代终止的字符。 |
在文件 TextRenderer.h 第 69 行定义.
|
inline |
打印字符串,直至行尾或字符串结束。
r | 使用的字符渲染器。 |
str | 被输出的字符串。 |
在文件 TextRenderer.h 第 87 行定义.
参考 PrintLine().
_tIn YSLib::Drawing::PrintString | ( | _tRenderer & | r, |
_tIn | s | ||
) |
打印迭代器指定的字符串,直至区域末尾或字符迭代终止。
r | 使用的字符渲染器。 |
s | 指向字符串起始字符的输入迭代器。 |
在文件 TextRenderer.h 第 161 行定义.
参考 PrintChar().
参考自 FetchStringWidth() , 以及 PrintString().
_tIn YSLib::Drawing::PrintString | ( | _tRenderer & | r, |
_tIn | s, | ||
_tIn | g, | ||
ucs4_t | c = {} |
||
) |
打印迭代器指定的字符串,直至区域末尾或字符迭代终止。
r | 使用的字符渲染器。 |
s | 指向字符串起始字符的输入迭代器。 |
g | 指示迭代终止位置的输入迭代器。 |
c | 指向迭代终止的字符。 |
在文件 TextRenderer.h 第 179 行定义.
|
inline |
打印字符串,直至区域末尾或字符串结束。
r | 使用的字符渲染器。 |
str | 被输出的字符串。 |
在文件 TextRenderer.h 第 194 行定义.
参考 PrintString().
u8 YSLib::Drawing::PutChar | ( | _tRenderer & | r, |
ucs4_t | c | ||
) |
打印单个字符。
在文件 CharRenderer.h 第 124 行定义.
参考 GetEndOfLinePositionOf() , 以及 PutCharBase().
参考自 PutLine() , 以及 PutString().
使用指定的文本状态和行末位置(横坐标)打印并判断是否需要具体渲染单个字符。
_tIn YSLib::Drawing::PutLine | ( | _tRenderer & | r, |
_tIn | s | ||
) |
打印迭代器指定的字符串,直至行尾或字符迭代终止。
r | 使用的字符渲染器。 |
s | 指向字符串起始字符的输入迭代器。 |
在文件 TextRenderer.h 第 103 行定义.
参考 PutChar().
参考自 DrawClippedText(),DrawText(),DualScreenReader::Execute(),DualScreenReader::PutLastLine(),PutLine() , 以及 HexViewArea::Refresh().
_tIn YSLib::Drawing::PutLine | ( | _tRenderer & | r, |
_tIn | s, | ||
_tIn | g, | ||
ucs4_t | c = {} |
||
) |
打印迭代器指定的字符串,直至行尾或字符迭代终止。
r | 使用的字符渲染器。 |
s | 指向字符串起始字符的输入迭代器。 |
g | 指示迭代终止位置的输入迭代器。 |
c | 指向迭代终止的字符。 |
在文件 TextRenderer.h 第 126 行定义.
|
inline |
打印字符串,直至行尾或字符串结束。
r | 使用的字符渲染器。 |
str | 被输出的字符串。 |
在文件 TextRenderer.h 第 146 行定义.
参考 PutLine().
|
inline |
|
inline |
绘制像素:(x, y) 。
Rect(g.GetSize()).Contains(x, y)
。 参考 Contains(),YSLib::Drawing::Graphics::GetBufferPtr(),YSLib::Drawing::Graphics::GetSize(),YSLib::Drawing::Graphics::GetWidth(),PutPixel() , 以及 YAssert.
_tIn YSLib::Drawing::PutString | ( | _tRenderer & | r, |
_tIn | s | ||
) |
打印迭代器指定的字符串,直至区域末尾或字符迭代终止。
r | 使用的字符渲染器。 |
s | 指向字符串起始字符的输入迭代器。 |
在文件 TextRenderer.h 第 210 行定义.
参考 FetchLastLineBasePosition() , 以及 PutChar().
参考自 DrawClippedText(),DrawText(),DualScreenReader::LoadText(),PutString() , 以及 DualScreenReader::UpdateView().
_tIn YSLib::Drawing::PutString | ( | _tRenderer & | r, |
_tIn | s, | ||
_tIn | g, | ||
ucs4_t | c = {} |
||
) |
打印迭代器指定的字符串,直至区域末尾或字符迭代终止。
r | 使用的字符渲染器。 |
s | 指向字符串起始字符的输入迭代器。 |
g | 指示迭代终止位置的输入迭代器。 |
c | 指向迭代终止的字符。 |
在文件 TextRenderer.h 第 233 行定义.
|
inline |
打印字符串,直至区域末尾或字符串结束。
r | 使用的字符渲染器。 |
str | 被输出的字符串。 |
在文件 TextRenderer.h 第 253 行定义.
参考 PutString().
YF_API void YSLib::Drawing::RectDrawArrow | ( | const Graphics & | , |
const Point & | , | ||
SDst | , | ||
Rotation | = RDeg0 , |
||
Color | c = ColorSpace::Black |
||
) |
在指定图形接口上下文的矩形上画箭头。
YF_API void YSLib::Drawing::RenderChar | ( | PaintContext && | pc, |
Color | , | ||
CharBitmap::BufferType | , | ||
const Size & | |||
) |
渲染单个字符。
pc | 指定字符所在区域和渲染目标的绘制上下文,其中 Location 为相对于源的坐标。 |
YF_API void YSLib::Drawing::RenderCharAlpha | ( | PaintContext && | pc, |
Color | , | ||
CharBitmap::BufferType | , | ||
const Size & | , | ||
u8 * | |||
) |
渲染带 Alpha 缓冲的单个字符。
pc | 指定字符所在区域和渲染目标的绘制上下文,其中 Location 为相对于源的坐标。 |
YF_API void YSLib::Drawing::SetCurrentTextLineNOf | ( | TextState & | , |
u16 | |||
) |
设置笔的行位置。
|
inline |
|
inline |
矩形区域颜色转换。
参考 platform::Color::GetB(),platform::Color::GetG() , 以及 platform::Color::GetR().
bool YSLib::Drawing::TransformRect | ( | const Graphics & | g, |
const Point & | pt, | ||
const Size & | s, | ||
_fTransformPixel | tp | ||
) |
以像素为单位变换标准矩形。
参考 YSLib::Drawing::Graphics::GetBufferPtr(),YSLib::Drawing::Graphics::GetSize() , 以及 YB_LIKELY.
参考自 YSL_BEGIN::RectDrawButton() , 以及 YSL_BEGIN::RectDrawCheckBox().
|
inline |
以像素为单位变换标准矩形。
参考 YSLib::Drawing::Rect::GetPoint() , 以及 YSLib::Drawing::Rect::GetSize().
yconstfn _tBinary YSLib::Drawing::Transpose | ( | _tBinary & | obj | ) |