42 }
else if ((
style > 4000) && (
style <= 4100)) {
43 if ((
style < 4100) && with_transparency)
48 return { color,
style };
274 ::Error(
"TPadPainterBase::SaveImage",
"TImage creation failed");
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
short Style_t
Style number (short)
short Color_t
Color number (short)
short Font_t
Font number (short)
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char text
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual Short_t GetTextAlign() const
Return the text alignment.
virtual Font_t GetTextFont() const
Return the text font.
virtual Float_t GetTextAngle() const
Return the text angle.
virtual Float_t GetTextSizePixels(TVirtualPad &pad) const
Return the text size in pixels for specified pad.
static Int_t GetColorTransparent(Int_t color, Float_t a)
Static function: Returns the transparent color number corresponding to n.
static TImage * Create()
Create an image.
void DrawTextNDC(Double_t u, Double_t v, const char *text, ETextMode mode) override
Paint text at NDC coordinates.
ESaveImageResult SaveAsImage(TVirtualPad *pad, const char *fileName, Int_t type) const override
Store pad image into the file One should provide FillImageFromPad implementation in the subclass.
void GetTextExtent(Font_t font, Double_t size, UInt_t &w, UInt_t &h, const char *mess) override
Returns text extend.
const TAttText & GetAttText() const override
Get text attributes.
UInt_t GetTextAdvance(Font_t font, Double_t size, const char *text, Bool_t kern) override
Returns text advance.
const TAttFill & GetAttFill() const override
Get fill attributes.
Bool_t fFullyTransparent
if transformed fill attributes fully transparent
Float_t GetTextMagnitude() const override
void DrawText(Double_t x, Double_t y, const char *text, ETextMode mode) override
Paint text.
virtual Double_t GetTTFScale() const
TAttFill GetAttFillInternal(Bool_t with_transparency)
Returns fill attributes after modification Checks for special fill styles 4000 .
void GetTextAscentDescent(Font_t font, Double_t size, UInt_t &a, UInt_t &d, const char *mess) override
Returns text accent / descent.
virtual void DrawTTFglyphs(Int_t x, Int_t y, TTFhandle &ttf, ETextMode mode)
Performs rendering of TTF glyphs on output device Can be implemented in derived classes instead of im...
Dynamic handle to work with freetype 2 library.
void GetTextExtent(UInt_t &w, UInt_t &h, const char *text)
Get width (w) and height (h) when text is horizontal.
Bool_t SetTextSize(Float_t textsize)
Set current text size.
void SetRotationMatrix(Float_t angle)
Set the rotation matrix used to rotate the font outlines.
void PrepareString(const char *string)
Put the characters in "string" in the "glyphs" array.
void SetTextFont(Font_t fontnumber)
Set specified font.
void SetKerning(Bool_t state)
void LayoutGlyphs()
Compute the glyphs positions, fgAscent and fgWidth (needed for alignment).
void GetTextAdvance(UInt_t &a, const char *text)
Get advance (a) when text is horizontal.
Bool_t ApplyAlignRotate(Int_t &px, Int_t &py, Int_t align, Int_t pad_width, Int_t pad_height)
Apply align and configured rotation matrix to text position px and py will be shifted to the place wh...
virtual Bool_t HasTTFonts() const
virtual Bool_t IsCocoa() const
virtual void const char * fileName
virtual Bool_t FillImageFromPad(TImage *image, TVirtualPad *pad) const
Fill TImage object by data from the pad Returns kFALSE if not supported or in case of failures.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Int_t YtoPixel(Double_t y) const =0
virtual UInt_t GetPadWidth() const =0
virtual Int_t VtoPixel(Double_t v) const =0
virtual UInt_t GetPadHeight() const =0
virtual Int_t XtoPixel(Double_t x) const =0
virtual Int_t UtoPixel(Double_t u) const =0
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.