Skip to content

Commit

Permalink
Moving and renaming
Browse files Browse the repository at this point in the history
Moved all the source files into the Source folder
  • Loading branch information
jimmckeeth committed Dec 12, 2018
1 parent a0f5133 commit 86f2f3c
Show file tree
Hide file tree
Showing 18 changed files with 9,490 additions and 9,486 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

*.local
*.stat
__history
*.local
*.identcache
*.dcu
*.dsk
*.~*
4 changes: 2 additions & 2 deletions Packages/Delphi/PowerPDFDD.dpk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package PowerPDFDD;

{$R *.res}
{$R '..\..\PowerPdf.dcr'}
{$R '..\..\Source\PowerPdf.dcr'}
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
Expand Down Expand Up @@ -35,6 +35,6 @@ requires
PowerPDFDR;

contains
PowerPdf in '..\..\PowerPdf.pas';
PowerPdf in '..\..\Source\PowerPdf.pas';

end.
4 changes: 2 additions & 2 deletions Packages/Delphi/PowerPDFDD.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\PowerPdf.dcr"/>
<DCCReference Include="..\..\Source\PowerPdf.dcr"/>
<DCCReference Include="PowerPDFDR.dcp"/>
<DCCReference Include="..\..\PowerPdf.pas"/>
<DCCReference Include="..\..\Source\PowerPdf.pas"/>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
Expand Down
18 changes: 9 additions & 9 deletions Packages/Delphi/PowerPDFDR.dpk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package PowerPDFDR;

{$R *.res}
{$R '..\..\PowerPdf.dcr'}
{$R '..\..\Source\PowerPdf.dcr'}
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS OFF}
Expand Down Expand Up @@ -37,13 +37,13 @@ requires
vclimg;

contains
PdfJpegImage in '..\..\PdfJpegImage.pas',
PdfTypes in '..\..\PdfTypes.pas',
PRAnnotation in '..\..\PRAnnotation.pas',
PReport in '..\..\PReport.pas',
PRJpegImage in '..\..\PRJpegImage.pas',
PdfDoc in '..\..\PdfDoc.pas',
PdfFonts in '..\..\PdfFonts.pas',
PdfImages in '..\..\PdfImages.pas';
PdfJpegImage in '..\..\Source\PdfJpegImage.pas',
PdfTypes in '..\..\Source\PdfTypes.pas',
PRAnnotation in '..\..\Source\PRAnnotation.pas',
PReport in '..\..\Source\PReport.pas',
PRJpegImage in '..\..\Source\PRJpegImage.pas',
PdfDoc in '..\..\Source\PdfDoc.pas',
PdfFonts in '..\..\Source\PdfFonts.pas',
PdfImages in '..\..\Source\PdfImages.pas';

end.
18 changes: 9 additions & 9 deletions Packages/Delphi/PowerPDFDR.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,18 @@
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\PowerPdf.dcr"/>
<DCCReference Include="..\..\Source\PowerPdf.dcr"/>
<DCCReference Include="rtl.dcp"/>
<DCCReference Include="vcl.dcp"/>
<DCCReference Include="vclimg.dcp"/>
<DCCReference Include="..\..\PdfJpegImage.pas"/>
<DCCReference Include="..\..\PdfTypes.pas"/>
<DCCReference Include="..\..\PRAnnotation.pas"/>
<DCCReference Include="..\..\PReport.pas"/>
<DCCReference Include="..\..\PRJpegImage.pas"/>
<DCCReference Include="..\..\PdfDoc.pas"/>
<DCCReference Include="..\..\PdfFonts.pas"/>
<DCCReference Include="..\..\PdfImages.pas"/>
<DCCReference Include="..\..\Source\PdfJpegImage.pas"/>
<DCCReference Include="..\..\Source\PdfTypes.pas"/>
<DCCReference Include="..\..\Source\PRAnnotation.pas"/>
<DCCReference Include="..\..\Source\PReport.pas"/>
<DCCReference Include="..\..\Source\PRJpegImage.pas"/>
<DCCReference Include="..\..\Source\PdfDoc.pas"/>
<DCCReference Include="..\..\Source\PdfFonts.pas"/>
<DCCReference Include="..\..\Source\PdfImages.pas"/>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
Expand Down
182 changes: 91 additions & 91 deletions PRJpegImage.pas → Source/PRJpegImage.pas
Original file line number Diff line number Diff line change
@@ -1,91 +1,91 @@
{*
* << P o w e r P d f >> -- PRJpegImage.pas
*
* Copyright (c) 1999-2001 Takezou. <[email protected]>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published
* by the Free Software Foundation; either version 2 of the License, or any
* later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
* details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library.
*
* 2001.07.01 create
* 2001.09.07 changes the implementation of TPdfImageCreator.
*
*}
unit PRJpegImage;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
PReport, PdfDoc, PdfTypes, PdfImages, PdfJpegImage, JPEG;

type
TPRJpegImage = class(TPRImage)
protected
procedure SetPicture(Value: TPicture); override;
procedure Print(ACanvas: TPRCanvas; ARect: TRect); override;
end;

implementation

// Print
procedure TPRJpegImage.Print(ACanvas: TPRCanvas; ARect: TRect);
var
FDoc: TPdfDoc;
FXObjectName: string;
i: integer;
begin
if not Printable then Exit;

if (FPicture = nil) or (FPicture.Graphic = nil) or
(FPicture.Graphic.Empty) or not (FPicture.Graphic is TJpegImage) then
Exit;
FDoc := ACanvas.PdfCanvas.Doc;
if SharedImage then
begin
FXObjectName := Self.Name;
if FDoc.GetXObject(FXObjectName) = nil then
FDoc.AddXObject(FXObjectName, CreatePdfImage(FPicture.Graphic, 'Pdf-Jpeg'));
end
else
begin
for i := 1 to MAX_IMAGE_NUMBER do
begin
FXObjectName := Self.Name + IntToStr(Random(MAX_IMAGE_NUMBER));
if FDoc.GetXObject(FXObjectName) = nil then Break;
if i = MAX_IMAGE_NUMBER then
raise Exception.Create('image count over max value..');
end;
FDoc.AddXObject(FXObjectName, CreatePdfImage(FPicture.Graphic, 'Pdf-Jpeg'));
end;
with ARect, ACanvas.PdfCanvas do
if FStretch then
DrawXObject(Left, Self.Page.Height - Bottom, Width, Height, FXObjectName)
else
DrawXObjectEx(Left, Self.Page.Height - Top - FPicture.Height,
FPicture.Width, FPicture.Height,
Left, Self.Page.Height - Top - Height, Width, Height, FXObjectName);
end;

// SetPicture
procedure TPRJpegImage.SetPicture(Value: TPicture);
begin
if (Value = nil) or (Value.Graphic = nil) or (Value.Graphic is TJpegImage) then
begin
FPicture.Assign(Value);
Invalidate;
end
else
raise exception.Create('only jpeg image is allowed.');
end;

end.
{*
* << P o w e r P d f >> -- PRJpegImage.pas
*
* Copyright (c) 1999-2001 Takezou. <[email protected]>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published
* by the Free Software Foundation; either version 2 of the License, or any
* later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
* details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library.
*
* 2001.07.01 create
* 2001.09.07 changes the implementation of TPdfImageCreator.
*
*}
unit PRJpegImage;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
PReport, PdfDoc, PdfTypes, PdfImages, PdfJpegImage, JPEG;

type
TPRJpegImage = class(TPRImage)
protected
procedure SetPicture(Value: TPicture); override;
procedure Print(ACanvas: TPRCanvas; ARect: TRect); override;
end;

implementation

// Print
procedure TPRJpegImage.Print(ACanvas: TPRCanvas; ARect: TRect);
var
FDoc: TPdfDoc;
FXObjectName: string;
i: integer;
begin
if not Printable then Exit;

if (FPicture = nil) or (FPicture.Graphic = nil) or
(FPicture.Graphic.Empty) or not (FPicture.Graphic is TJpegImage) then
Exit;
FDoc := ACanvas.PdfCanvas.Doc;
if SharedImage then
begin
FXObjectName := Self.Name;
if FDoc.GetXObject(FXObjectName) = nil then
FDoc.AddXObject(FXObjectName, CreatePdfImage(FPicture.Graphic, 'Pdf-Jpeg'));
end
else
begin
for i := 1 to MAX_IMAGE_NUMBER do
begin
FXObjectName := Self.Name + IntToStr(Random(MAX_IMAGE_NUMBER));
if FDoc.GetXObject(FXObjectName) = nil then Break;
if i = MAX_IMAGE_NUMBER then
raise Exception.Create('image count over max value..');
end;
FDoc.AddXObject(FXObjectName, CreatePdfImage(FPicture.Graphic, 'Pdf-Jpeg'));
end;
with ARect, ACanvas.PdfCanvas do
if FStretch then
DrawXObject(Left, Self.Page.Height - Bottom, Width, Height, FXObjectName)
else
DrawXObjectEx(Left, Self.Page.Height - Top - FPicture.Height,
FPicture.Width, FPicture.Height,
Left, Self.Page.Height - Top - Height, Width, Height, FXObjectName);
end;

// SetPicture
procedure TPRJpegImage.SetPicture(Value: TPicture);
begin
if (Value = nil) or (Value.Graphic = nil) or (Value.Graphic is TJpegImage) then
begin
FPicture.Assign(Value);
Invalidate;
end
else
raise exception.Create('only jpeg image is allowed.');
end;

end.
Loading

0 comments on commit 86f2f3c

Please sign in to comment.