下面示范 Firemonkey TImageList 加入一张原始尺寸图片的方法: 使用代码加图 if Assigned(List) then begin MyList.Items.Clear; do begin // Create list view item Item:= MyList.Items.Add; Item.Text:= List[i]; // Load image src:='http://www.w3schools.com/html/pic_mountain.jpg'; ms:
FireMonkey 能将目前使用的 Style 导出成文件,它提供二种文件格式,请看下列代码: *.style procedure TForm1.Button1Click(Sender: TObject); var Stream1: TFileStream; begin if TStyleManager.ActiveStyle(Self) <> nil then begin Stream1 := TFileStream.Create('d:\test.style', fmCreate); /
VCL 和 Firemonkey 的 Bitmap 处理像素的方式不相同,下例为将图片内不是「白色」的像素全部改成「黑色」: procedure TForm1.Button1Click(Sender: TObject); var x, y: Integer; vBitMapData: TBitmapData; begin if Image1.Bitmap.Map(TMapAccess.maWrite, vBitMapData) then begin do do if vBitMapData.Ge