图形对象

The pen, brush, bitmap, palette, region, and path associated with a DC are referred to as its graphic objects. The following attributes are associated with each of these objects

 

与DC相联系的画笔,笔刷,调色板,区域和路径被称为图形对象,以下属性与每个对象相关联。

 

Graphic objectAssociated attributes
BitmapSize, in bytes; dimensions, in pixels; color-format; compression scheme; and so on.
BrushStyle, color, pattern, and origin.
PaletteColors and size (or number of colors).
FontTypeface name, width, height, weight, character set, and so on.
PathShape.
PenStyle, width, and color.
RegionLocation and dimensions.

 

When an application creates a DC, the system automatically stores a set of default objects in it. (There is no default bitmap or path.) An application can examine the attributes of the default objects by calling the GetCurrentObject and GetObject functions. The application can change these defaults by creating a new object and selecting it into the DC. An object is selected into a DC by calling the SelectObject function

 

当应用程序创建一个DC时,系统自动为它初始化一系列默认对象。(没有默认位图对象或路径对象。)程序可调用GetCurrentObject和GetObject函数检查这些对象的属性,也可以通过新建对象并且选择到DC中。对象通过调用SelectObject函数选择到DC中,以覆盖默认对象。

 

An application can set the current brush color to a specified color value with SetDCBrushColor .

 

应用程序可以用SetDCBrushColor函数将当前画笔的颜色设置为指定的颜色。

 

The GetDCBrushColor function returns the DC brush color. The SetDCPenColor function sets the pen color to a specified color value. The GetDCPenColor function returns the DC pen color.

 

GetDCBrushColor函数返回DC的画笔颜色。SetDCPenColor函数设置钢笔的颜色为指定指定颜色值,GetDCPenColor返回当前DC中钢笔的颜色值。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值