YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
Function for 2D Drawing

2D 图形操作。 更多...

函数

void YSLib::Drawing::PutPixel (BitmapPtr dst, SDst w, SPos x, SPos y, Color c)
 修改指定位置的像素:(x, y) 。 更多...
 
void YSLib::Drawing::PutPixel (const Graphics &g, SPos x, SPos y, Color c)
 修改指定位置的像素:(x, y) 。 更多...
 
void YSLib::Drawing::PlotPixel (BitmapPtr dst, const Rect &bounds, SDst w, SPos x, SPos y, Color c)
 绘制指定位置的像素:(x, y) 。 更多...
 
void YSLib::Drawing::DrawPoint (const Graphics &g, const Rect &bounds, SPos x, SPos y, Color c)
 描画点。 更多...
 
void YSLib::Drawing::DrawPoint (const Graphics &g, const Rect &bounds, const Point &pt, Color c)
 

详细描述

2D 图形操作。

自从
build 452

更改 2D 光栅图形相关数据结构的状态以显示图形。 光栅图形以表示像素缓冲区的 BitmapPtr 或 Graphics& 类型表示。 包括以下接口: Put* 为基本状态修改操作; Plot* 以 BitmapPtr 和 const Rect& 为首参数,为带边界检查的绘制操作; Draw* 以 Graphics& 为首参数,第二个参数非表示边界的 const Rect& , 为带 Graphics 边界检查的描画操作; Draw* 以 Graphics& 和表示边界的 const Rect& 为首参数, 为带一般边界检查的描画操作; Fill* 参数同 Draw* ,为带边界检查的填充操作。 以上边界检查指运行时忽略越界的状态修改,要求指定的边界必须包含于缓冲区。

函数说明

void YSLib::Drawing::DrawPoint ( const Graphics &  g,
const Rect &  bounds,
SPos  x,
SPos  y,
Color  c 
)
inline

描画点。

在文件 ydraw.h98 行定义.

参考 YSLib::Drawing::bounds, YSLib::Drawing::c, YSLib::UI::Contains, YSLib::Drawing::PlotPixel() , 以及 YAssert.

参考自 YSLib::Drawing::DrawPoint() , 以及 YSLib::Drawing::DrawRectRoundCorner().

函数调用图:

这是这个函数的调用关系图:

void YSLib::Drawing::DrawPoint ( const Graphics &  g,
const Rect &  bounds,
const Point &  pt,
Color  c 
)
inline
void YSLib::Drawing::PlotPixel ( BitmapPtr  dst,
const Rect &  bounds,
SDst  w,
SPos  x,
SPos  y,
Color  c 
)
inline

绘制指定位置的像素:(x, y) 。

自从
build 452

在文件 ydraw.h89 行定义.

参考 YSLib::Drawing::Rect::Contains() , 以及 YSLib::Drawing::PutPixel().

参考自 YSLib::Drawing::DrawCircle(), YSLib::Drawing::DrawPoint() , 以及 YSLib::Drawing::PlotLineSeg().

函数调用图:

这是这个函数的调用关系图:

void YSLib::Drawing::PutPixel ( BitmapPtr  dst,
SDst  w,
SPos  x,
SPos  y,
Color  c 
)
inline

修改指定位置的像素:(x, y) 。

前置条件
断言 dst
自从
build 394

在文件 ydraw.h64 行定义.

参考 YSLib::Drawing::c , 以及 YAssertNonnull.

参考自 YSLib::Drawing::PlotPixel() , 以及 YSLib::Drawing::PutPixel().

这是这个函数的调用关系图:

void YSLib::Drawing::PutPixel ( const Graphics &  g,
SPos  x,
SPos  y,
Color  c 
)
inline

修改指定位置的像素:(x, y) 。

前置条件
断言 Rect(g.GetSize()).Contains(x, y)

在文件 ydraw.h75 行定义.

参考 YSLib::Drawing::c, YSLib::UI::Contains, YSLib::Drawing::PutPixel() , 以及 YAssert.

函数调用图: