FoxVirtualImgList
<p>FoxVirtualImgList,FoxUI提供的支持多dpi的图标列表组件
这个组件和FoxUIBmp32List最大的区别就是这个组件支持多DPI设定,FoxUI组件全面兼容此组件,我们也可以采用对
FoxUIBmp32List的Dfactor属性赋值来达到效果,不过这种方式是缩放实现的有质量损失。</p>
<p><strong>属性</strong>
Alpha 透明度</p>
<p>ImgHeigh 图标起始高度
ImgWidth 图标起始宽度</p>
<p>Items 图标集合</p>
<p>Sizes 设置多DPI支持</p>
<p>WorkBmp 所有的图全部保存在此图上</p>
<p><strong>提供的方法和函数</strong>
function AddNewItem(sf:string;AutoResize:Boolean=false):Integer;overload;//新增一项
function AddNewItem(Abmp:TBitmap32;AutoResize:Boolean=false):Integer;overload;
function IndexOfItemName(AName:string):Integer;//更加名称获取图标索引
Procedure ReplaceImage(const png:TFoxUIPNG;index:Integer;ItemName:String='');//替换
//支持输出bmp和png两种格式
Function SaveIndexImg(sf:string;ImgIndex:Integer):Boolean;//输出对应索引图片
procedure ChangeItemName(Index:Integer;NewName:string);//修改item名称
procedure AddImgToItem(sf:string;itemindex:Integer;SizeIndex:Integer); overload;//增加图片到项
procedure AddImgToItem(ABmp:TBitmap32;itemindex:Integer;SizeIndex:Integer);overload;//增加图片到项
//输出图标
Procedure Draw(ACanvas:TCanvas;Left,Top:Integer;index:Integer;IsEnabled:Boolean=True);override;
Procedure DrawTo(DstBmp:TBitmap32;Left,Top:Integer;index:Integer;IsEnabled:Boolean=True);override;
procedure DrawStateTo(DstBmp:TBitmap32;State,Left,Top:Integer;index:Integer;IsEnabled:Boolean=True);override;
Procedure DrawRect(DstBmp:TBitmap32;dstRect:TRect;index:Integer;Resize:Boolean=True);override;</p>