You've already forked lazarus-ccr
PowerPDF, add angle support to TPRLabel, patch from Julio Jiménez Borreguero
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2580 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -380,12 +380,15 @@ type
|
||||
FAlignment: TAlignment;
|
||||
FClipping: boolean;
|
||||
FAlignJustified: boolean;
|
||||
FAngle: integer;
|
||||
procedure SetAlignment(Value: TAlignment);
|
||||
procedure SetAlignJustified(Value: boolean);
|
||||
procedure SetCanvasProperties(ACanvas: TPdfCanvas);
|
||||
protected
|
||||
procedure Paint; override;
|
||||
procedure Print(ACanvas: TPRCanvas; ARect: TRect); override;
|
||||
public
|
||||
property Angle: integer read Fangle write Fangle;
|
||||
published
|
||||
function GetTextWidth: Single;
|
||||
property Caption;
|
||||
@ -1837,6 +1840,10 @@ begin
|
||||
|
||||
SetCanvasProperties(ACanvas.PdfCanvas);
|
||||
|
||||
// Only one line of text rotated for now. It's the begining
|
||||
if Angle=90 then
|
||||
ACanvas.PdfCanvas.TextOutRotatedUp(ARect.Left + FontSize, GetPage.Height - ARect.Top, Caption)
|
||||
else
|
||||
ACanvas.TextRect(ARect, Caption, FAlignment, Clipping);
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user