mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 04:36:31 +02:00
printers4lazarus, cairocanvas: do not use cairo on win64
git-svn-id: trunk@40782 -
This commit is contained in:
parent
43469b6441
commit
f5a1a29ff0
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -570,6 +570,7 @@ components/cairocanvas/README.txt svneol=native#text/plain
|
||||
components/cairocanvas/cairocanvas.pas svneol=native#text/plain
|
||||
components/cairocanvas/cairocanvas_pkg.lpk svneol=native#text/plain
|
||||
components/cairocanvas/cairocanvas_pkg.pas svneol=native#text/plain
|
||||
components/cairocanvas/cairocanvasall.pas svneol=native#text/plain
|
||||
components/cairocanvas/cairographics.pas svneol=native#text/plain
|
||||
components/cairocanvas/cairoprinter.pas svneol=native#text/pascal
|
||||
components/cairocanvas/tests/24217/project1.lpi svneol=native#text/plain
|
||||
|
@ -18,15 +18,21 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="TCairoPrinterCanvas using the Cairo library."/>
|
||||
<License Value="see COPYING.modifiedLGPL.txt"/>
|
||||
<Files Count="2">
|
||||
<Files Count="3">
|
||||
<Item1>
|
||||
<Filename Value="cairocanvas.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="CairoCanvas"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="cairoprinter.pas"/>
|
||||
<UnitName Value="cairoprinter"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="CairoPrinter"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="cairocanvasall.pas"/>
|
||||
<UnitName Value="cairocanvasall"/>
|
||||
</Item3>
|
||||
</Files>
|
||||
<RequiredPkgs Count="1">
|
||||
<Item1>
|
||||
|
@ -7,7 +7,7 @@ unit cairocanvas_pkg;
|
||||
interface
|
||||
|
||||
uses
|
||||
CairoCanvas, CairoPrinter;
|
||||
CairoCanvasAll;
|
||||
|
||||
implementation
|
||||
|
||||
|
18
components/cairocanvas/cairocanvasall.pas
Normal file
18
components/cairocanvas/cairocanvasall.pas
Normal file
@ -0,0 +1,18 @@
|
||||
{ The CairoCanvas package can be compiled on all platforms.
|
||||
This unit defines what units are available on which platform.
|
||||
}
|
||||
unit CairoCanvasAll;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
{$IFNDEF win64}
|
||||
uses
|
||||
{%H-}CairoCanvas, {%H-}CairoPrinter;
|
||||
{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
@ -1184,8 +1184,11 @@ end;
|
||||
|
||||
function TCUPSPrinter.DoGetDefaultCanvasClass: TPrinterCanvasRef;
|
||||
begin
|
||||
//Result := TPostscriptPrinterCanvas;
|
||||
{$IFDEF UseCairo}
|
||||
Result := TCairoPsCanvas;
|
||||
{$ELSE}
|
||||
Result := TPostscriptPrinterCanvas;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TCUPSPrinter.GetPrinterType: TPrinterType;
|
||||
|
@ -53,9 +53,18 @@
|
||||
This code is heavily based on Tony Maro's initial Printers.pas
|
||||
implementation in the LCL, but was adapted to work with CUPS.
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$IFNDEF win64}
|
||||
{$DEFINE UseCairo}
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, PostScriptCanvas, Printers, Dialogs, Controls,
|
||||
CUPSDyn, CairoCanvas;
|
||||
CUPSDyn
|
||||
{$IFDEF UseCairo}
|
||||
,CairoCanvas
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
type
|
||||
TCUPSPrinterState = (
|
||||
|
Loading…
Reference in New Issue
Block a user