特别是,我想预设所需的大小,从外部源获取位图,然后以优雅的面向对象的方式处理数据.
我猜是什么
我有这样的假设吗?
TBits内部是位结构的,因此它不是一个简单的布尔集合.要访问内部数据指针,class helpers可以使用.
Type
TBitsHelper = class helper for TBits
private
function GetBitsPointer: Pointer;
public
property BitsPt: pointer read GetBitsPointer;
end;
function TBitsHelper.GetBitsPointer: Pointer;
begin
with Self do Result := FBits;
end;
Run Code Online (Sandbox Code Playgroud)