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;
|
FAlignment: TAlignment;
|
||||||
FClipping: boolean;
|
FClipping: boolean;
|
||||||
FAlignJustified: boolean;
|
FAlignJustified: boolean;
|
||||||
|
FAngle: integer;
|
||||||
procedure SetAlignment(Value: TAlignment);
|
procedure SetAlignment(Value: TAlignment);
|
||||||
procedure SetAlignJustified(Value: boolean);
|
procedure SetAlignJustified(Value: boolean);
|
||||||
procedure SetCanvasProperties(ACanvas: TPdfCanvas);
|
procedure SetCanvasProperties(ACanvas: TPdfCanvas);
|
||||||
protected
|
protected
|
||||||
procedure Paint; override;
|
procedure Paint; override;
|
||||||
procedure Print(ACanvas: TPRCanvas; ARect: TRect); override;
|
procedure Print(ACanvas: TPRCanvas; ARect: TRect); override;
|
||||||
|
public
|
||||||
|
property Angle: integer read Fangle write Fangle;
|
||||||
published
|
published
|
||||||
function GetTextWidth: Single;
|
function GetTextWidth: Single;
|
||||||
property Caption;
|
property Caption;
|
||||||
@ -1837,7 +1840,11 @@ begin
|
|||||||
|
|
||||||
SetCanvasProperties(ACanvas.PdfCanvas);
|
SetCanvasProperties(ACanvas.PdfCanvas);
|
||||||
|
|
||||||
ACanvas.TextRect(ARect, Caption, FAlignment, Clipping);
|
// 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;
|
end;
|
||||||
|
|
||||||
function TPRLabel.GetTextWidth: Single;
|
function TPRLabel.GetTextWidth: Single;
|
||||||
|
Reference in New Issue
Block a user