Tbitmap



Tbitmap

Tbitmap是Windows位图(HBITMAP)的封装,包含调色板(HPALETTE)。

Unit Graphics

说明:

位图是一个可以用来创建,处理(scale, scroll, rotate, and paint)和在内存中存储图像或在硬盘上以文件形式存储的,功能强大的图形对象。

Tbitmap包含一个位图图解的内部图像,并可以在绘图时自动处理调色板的实现。

在画布上绘制位图需要引用Tcanvas对象的Draw或者StretchDraw方法,通过Tbitmap作为参数。

创建Tbitmap的副本非常迅速,因为在图像被复制之前句柄已经被复制。在多个Tbitmap对象共享一个句柄的情况下,如果要修改图像,图像会在修改之前被复制。

In Tbitmap

Canvas:提供一个代表位图的绘图接口的途径。

Empty:说明位图对象是否包含位图。

Handle:Provides access to the Windows GDI bitmap handle for accessing the GDI bitmap object.

Handle Type:指出位图是设备独立位图还是设备依赖位图。

Height:位图的垂直高度,以象素计量。

IgnorePalette:决定位图绘制图形时是否应用调色板。

MaskHandle:Provides access to the Windows GDI bitmap handle for accessing the GDI bitmap object.

Monochrome:决定位图是否以单色显示图像。

Palette:用来读或改变一个256色位图的调色板。控制位图颜色适配。

PixelFormat:指出位图图像的位格式,规定图像怎样显示,位图图像象素怎样存储在内存中。

ScanLine:提供每一行象素的访问索引。

TransparentColor:Determines which color of the bitmap is to be transparent when the bitmap is drawn.

TransparentMode:Determines whether the TransparentColor property's value is automatically calculated or stored with the bitmap object.

Width:规定位图象素宽度。

Derived from Tgraphic

Modified:指出图形对象是否被改变或编辑。

PaletteModified:指出调色板是否被改变。

Transparent:Indicates whether the image covers its rectangular area.

Methods

In Tbitmap

Assign:复制一个新位图图像到位图对象。

Create:例示一个位图对象。程序运行时例示一个位图对象。

Destroy:释放位图对象例示。

Dormant:创建一个存储位图映象来释放位图句柄,强制图像转换位DIB格式来节省资源。

FreeImage:释放以位图方式缓存在存储器中的文件图像。

HandleAllocated:指出Tbitmap对象是否获得一个指向隐藏GDI对象的句柄。

LoadFromClipboardFormat:从剪贴板上加载位图到位图对象。

LoadFromResourceID:从resource加载位图到位图对象。

LoadFromResourceName:加载一个位图资源到位图对象。

LoadFromStream:从一个stream中加载位图到位图对象。

Mask:把目前位图图像变为单色mask,用白色代替TransparentColor,用黑色代替其他颜色。Mask(TransparentColor: TColor);

ReleaseHandle:返回句柄到位图,使Tbitmap对象不再知道这个句柄。

ReleaseMaskHandle:返回句柄到位图mask,使Tbitmap对象不再知道这个mask句柄。

ReleasePalette:返回位图调色板句柄,把调色板从Tbitmap对象。

SaveToClipboardFormat:以剪贴板格式创建位图本地复制。

SaveToStream:保存位图到a stream

Derived from Tgraphic

LoadFromFile:从文件中加载graphic image。

SaveToFile:存储graphics image到文件。

Derived from TinterfacedPersistent

AfterConstruction:获得一个Owner的接口参考。

QueryInterface:如果对象支持接口,返回规定接口的参考。

Derived from TPersistent

GetNamePath:返回对象名字。

Derived from Tobject

BeforeDestruction:第一个destructor执行前响应。

ClassInfo:Returns a pointer to the runtime type information (RTTI) table for the object type.

ClassName:Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).

ClassParent:Returns the type of the immediate ancestor of a class.

ClassType:Returns the class reference for the object’s class.

CleanupInstance:Performs finalization on long strings, variants, and interface variables within a class.

DefaultHandler:为一个处理信息记录的方法提供一个接口。

Dispatch:Calls message-handling methods for the object, based on the contents of the Message parameter

你可能感兴趣的:(Tbitmap)