For example, the code in Listing 1 draws a square using the rect function, then specifies a change to the coordinate system using translate.
例如,清单1所示代码使用rect函数绘制了一个正方形,然后使用translate修改坐标系统。
The rect function draws a rectangle, with the first two points defining the location and the next two defining width and height, respectively.
rect函数可绘制一个矩形,并且前两个点定义位置,而后面两个点则分别定义宽度和高度。
Any new shapes drawn after the translate function appears using the offset; so in this case, the rect function actually creates a square at 100, 100, 150, 150, as shown in Figure 1, cell a.
translate函数之后绘制的任何形状都会加上这个偏移量;所以在这里,rect函数实际上在坐标100,100,150,150上创建一个正方形,如图1的单元格a所示。
Rect - The Area Light emitter has a rectangular shape.
矩形-区域灯光发射体呈矩形。
The paint structure contains a rect data structure that has the smallest rectangle that completely encloses the update region and a flag that specifies whether the background has been erased.
绘图结构中包含了一个RECT数据结构,它包含了完全封闭更新区域的最小矩形以及一个标志,指明背景是否需要擦除。
Point and RECT are safe as they contain no Pointers or references to data stored in memory.
点和矩形是安全的,因为它们不包含指针或内存中存储的数据参考。
应用推荐