Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | {4789} made SynGdiPlus thread-safe - thanks BugsDigger for the patch! |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
93f8369d36426ed1dcb713f6f2c9b65e |
User & Date: | ab 2018-09-06 13:55:07 |
2018-09-06
| ||
17:13 | {4790} added some regression tests about RawJSON/RawUTF8 big content check-in: 87b6b2b09e user: ab tags: trunk | |
13:55 | {4789} made SynGdiPlus thread-safe - thanks BugsDigger for the patch! check-in: 93f8369d36 user: ab tags: trunk | |
13:28 | {4788} added sample 36 check-in: 347bf25e69 user: ab tags: trunk | |
Changes to SynGdiPlus.pas.
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
....
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
|
begin
if not fHasContent then
result := nil else begin
result := TBitmap.Create;
result.PixelFormat := pf24bit; // create as DIB (device-independent bitmap)
result.Width := Width;
result.Height := Height;
result.Canvas.Draw(0,0,self);
end;
end;
{$ifdef FPC}
function TSynPicture.GetTransparent: Boolean;
begin // not implemented
result := false;
................................................................................
// resize to the maximum side specified parameter
Bmp := TBitmap.Create;
try
Bmp.PixelFormat := pf24bit; // create as DIB (device-independent bitmap)
R := Pic.RectNotBiggerThan(MaxPixelsForBiggestSide);
Bmp.Width := R.Right;
Bmp.Height := R.Bottom;
Pic.Draw(Bmp.Canvas,R);
SynGdiPlus.SaveAs(Bmp,Stream,Format,CompressionQuality,0,BitmapSetResolution);
finally
Bmp.Free;
end;
end;
finally
if Pic<>Graphic then
|
>
>
|
>
>
>
>
>
|
>
>
>
|
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
....
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
|
begin if not fHasContent then result := nil else begin result := TBitmap.Create; result.PixelFormat := pf24bit; // create as DIB (device-independent bitmap) result.Width := Width; result.Height := Height; result.Canvas.Lock; try result.Canvas.Draw(0,0,self); finally result.Canvas.Unlock; end; end; end; {$ifdef FPC} function TSynPicture.GetTransparent: Boolean; begin // not implemented result := false; ................................................................................ // resize to the maximum side specified parameter Bmp := TBitmap.Create; try Bmp.PixelFormat := pf24bit; // create as DIB (device-independent bitmap) R := Pic.RectNotBiggerThan(MaxPixelsForBiggestSide); Bmp.Width := R.Right; Bmp.Height := R.Bottom; Bmp.Canvas.Lock; try Pic.Draw(Bmp.Canvas,R); finally Bmp.Canvas.Unlock; end; SynGdiPlus.SaveAs(Bmp,Stream,Format,CompressionQuality,0,BitmapSetResolution); finally Bmp.Free; end; end; finally if Pic<>Graphic then |
Changes to SynopseCommit.inc.
1 |
'1.18.4788'
|
| |
1 |
'1.18.4789'
|