mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 02:59:21 +02:00
tools: fix xpm to png compilation
git-svn-id: trunk@20349 -
This commit is contained in:
parent
c8d72d2c31
commit
c96351a2e3
@ -2,8 +2,11 @@
|
|||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="6"/>
|
<Version Value="7"/>
|
||||||
<General>
|
<General>
|
||||||
|
<Flags>
|
||||||
|
<LRSInOutputDirectory Value="False"/>
|
||||||
|
</Flags>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<TargetFileExt Value=".exe"/>
|
<TargetFileExt Value=".exe"/>
|
||||||
<ActiveEditorIndexAtStart Value="0"/>
|
<ActiveEditorIndexAtStart Value="0"/>
|
||||||
@ -34,30 +37,31 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="xpm_to_png.lpr"/>
|
<Filename Value="xpm_to_png.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="70" Y="125"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="104"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="2" HistoryIndex="1">
|
<JumpHistory Count="3" HistoryIndex="2">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="xpm_to_png.lpr"/>
|
<Filename Value="xpm_to_png.lpr"/>
|
||||||
<Caret Line="1" Column="1" TopLine="94"/>
|
<Caret Line="180" Column="1" TopLine="145"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="xpm_to_png.lpr"/>
|
<Filename Value="xpm_to_png.lpr"/>
|
||||||
<Caret Line="180" Column="1" TopLine="145"/>
|
<Caret Line="23" Column="48" TopLine="1"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="xpm_to_png.lpr"/>
|
||||||
|
<Caret Line="107" Column="48" TopLine="104"/>
|
||||||
|
</Position3>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="8"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<CodeGeneration>
|
|
||||||
<Generate Value="Faster"/>
|
|
||||||
</CodeGeneration>
|
|
||||||
<Linking>
|
<Linking>
|
||||||
<Options>
|
<Options>
|
||||||
<Win32>
|
<Win32>
|
||||||
|
@ -104,11 +104,12 @@ begin
|
|||||||
SrcImg.Free;
|
SrcImg.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TransparentCopy(Dest, Source: TBitmap; Width, Height: Integer);
|
procedure TransparentCopy(Dest, Source: TCustomBitmap; Width, Height: Integer);
|
||||||
var
|
var
|
||||||
SrcImage, RawImg: TRawImage;
|
SrcImage, RawImg: TRawImage;
|
||||||
Img, DeviceImg: TLazIntfImage;
|
Img, DeviceImg: TLazIntfImage;
|
||||||
ImgHandle, MskHandle: HBitmap;
|
ImgHandle, MskHandle: HBitmap;
|
||||||
|
R: TRect;
|
||||||
begin
|
begin
|
||||||
RawImg.Init;
|
RawImg.Init;
|
||||||
FillDescription(RawImg.Description, Width, Height);
|
FillDescription(RawImg.Description, Width, Height);
|
||||||
@ -120,7 +121,8 @@ begin
|
|||||||
else
|
else
|
||||||
MskHandle := 0;
|
MskHandle := 0;
|
||||||
|
|
||||||
Widgetset.RawImage_FromBitmap(SrcImage, Source.Handle, MskHandle, Rect(0, 0, Source.Width, Source.Height));
|
R := Rect(0, 0, Source.Width, Source.Height);
|
||||||
|
Widgetset.RawImage_FromBitmap(SrcImage, Source.Handle, MskHandle, @R);
|
||||||
InternalSetImage(RawImg, SrcImage);
|
InternalSetImage(RawImg, SrcImage);
|
||||||
|
|
||||||
// force output png with colorformat = 4
|
// force output png with colorformat = 4
|
||||||
|
Loading…
Reference in New Issue
Block a user