30using size_type = std::vector<TPoint>::size_type;
34 std::vector<TPoint> &
dst);
45 std::vector<TPoint> &
dst);
125 return gVirtualX->InheritsFrom(
"TGCocoa");
133 return gVirtualX->InheritsFrom(
"TGQuartz");
312 ::Error(
"TPadPainter::DrawFillArea",
"invalid number of points %d",
nPoints);
327 ::Error(
"TPadPainter::DrawFillArea",
"invalid number of points %d",
nPoints);
344 ::Error(
"TPadPainter::DrawPolyLine",
"invalid number of points");
361 ::Error(
"TPadPainter::DrawPolyLine",
"invalid number of points");
378 ::Error(
"TPadPainter::DrawPolyLineNDC",
"invalid number of points %d",
n);
382 std::vector<TPoint>
xy(
n);
384 for (
Int_t i = 0; i <
n; ++i) {
401 ::Error(
"TPadPainter::DrawSegments",
"invalid number of segments %d",
n);
405 std::vector<TPoint>
xy(
n*2);
407 for (
Int_t i = 0; i <
n*2; ++i) {
408 if ((i % 2 == 0) && (
x[i] ==
x[i+1]) && (
y[i] ==
y[i+1])) {
432 ::Error(
"TPadPainter::DrawSegmentsNDC",
"invalid number of segments %d",
n);
436 std::vector<TPoint>
xy(
n*2);
438 for (
Int_t i = 0; i <
n*2; ++i) {
439 if ((i % 2 == 0) && (
u[i] ==
u[i+1]) && (
v[i] ==
v[i+1])) {
462 ::Error(
"TPadPainter::DrawPolyMarker",
"invalid number of points %d",
n);
476 ::Error(
"TPadPainter::DrawPolyMarker",
"invalid number of points %d",
n);
529 pad->GetCanvas() &&
pad->GetCanvas()->GetCanvasID() != -1) {
538 const std::unique_ptr<unsigned char[]>
544 image->DrawRectangle(0, 0,
w,
h);
545 if (
unsigned char *
argb = (
unsigned char *)
image->GetArgbArray()) {
547 if (
sizeof(
UInt_t) == 4) {
554 const unsigned shift = std::numeric_limits<unsigned char>::digits;
611 std::vector<TPoint> &
dst)
618 for (
unsigned i = 0; i <
nPoints; ++i) {
681 std::vector<TPoint> &
dst)
689 for (
unsigned i = 0; i <
nPoints;) {
778 const T *
y, std::vector<TPoint> &
dst)
803 std::vector<TPoint>
xy;
806 pad->GetWh() *
pad->GetAbsHNDC())) * 2;
810 ::Error(
"DrawFillAreaAux",
"invalid pad's geometry");
821 xy.push_back(
xy.front());
832 std::vector<TPoint>
xy;
835 pad->GetWh() *
pad->GetAbsHNDC())) * 2;
838 ::Error(
"DrawPolyLineAux",
"invalid pad's geometry");
859 for (
unsigned i = 0; i <
nPoints; ++i) {
Handle_t WinContext_t
Window drawing context.
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
float Float_t
Float 4 bytes (float)
short SCoord_t
Screen coordinates (short)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint xy
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
Option_t Option_t TPoint TPoint percent
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
Option_t Option_t TPoint TPoint const char y1
Fill Area Attributes class.
virtual Width_t GetLineWidth() const
Return the line width.
Int_t GetCanvasID() const override
UInt_t GetWw() const override
UInt_t GetWh() const override
void Flush()
Flush canvas buffers.
static TImage * Create()
Create an image.
void SetAttFill(const TAttFill &att) override
Set fill attributes.
void SetAttText(const TAttText &att) override
Set text attributes.
TAttLine fAttLine
current line attributes
Bool_t fFullyTransparent
if transformed fill attributes fully transparent
void SetAttMarker(const TAttMarker &att) override
Set marker attributes.
void SetAttLine(const TAttLine &att) override
Set line attributes.
Float_t GetTextAngle() const override
TAttFill GetAttFillInternal(Bool_t with_transparency)
Returns fill attributes after modification Checks for special fill styles 4000 .
void DrawSegments(Int_t n, Double_t *x, Double_t *y) override
Paint N segments on the pad.
TPadPainter()
Empty ctor. We need it only because of explicit copy ctor.
void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y) override
Paint filled area.
void SetAttText(const TAttText &att) override
Set text attributes.
void DrawPixels(const unsigned char *pixelData, UInt_t width, UInt_t height, Int_t dstX, Int_t dstY, Bool_t enableAlphaBlending) override
Noop, for non-gl pad TASImage calls gVirtualX->CopyArea.
void UpdateDrawable(Int_t mode) override
Call low-level update of selected drawable, redirect to gVirtualX.
void CopyDrawable(Int_t device, Int_t px, Int_t py) override
Copy a gVirtualX pixmap.
void SetAttMarker(const TAttMarker &att) override
Set marker attributes.
void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y) override
Paint Polyline.
Int_t ResizeDrawable(Int_t device, UInt_t w, UInt_t h) override
Resize a gVirtualX Pixmap.
Float_t GetTextMagnitude() const override
Delegate to gVirtualX.
Bool_t IsSupportAlpha() const override
Returns true if trasnparent colors are supported.
Int_t CreateDrawable(UInt_t w, UInt_t h) override
Create a gVirtualX Pixmap.
void SetAttFill(const TAttFill &att) override
Set fill attributes.
void DrawPolyMarker(Int_t n, const Double_t *x, const Double_t *y) override
Paint polymarker.
void SetOpacity(Int_t percent) override
Delegate to gVirtualX.
void DrawTextNDC(Double_t u, Double_t v, const char *text, ETextMode mode) override
Paint text in normalized coordinates.
Bool_t IsCocoa() const override
Returns true when cocoa backend is used.
void SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) const override
Save the image displayed in the canvas pointed by "pad" into a binary file.
void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v) override
Paint polyline in normalized coordinates.
void SetDrawMode(Int_t device, Int_t mode) override
Set drawing mode for specified device.
void ClearDrawable() override
Clear the current gVirtualX window.
void DestroyDrawable(Int_t device) override
Close the current gVirtualX pixmap.
void DrawSegmentsNDC(Int_t n, Double_t *u, Double_t *v) override
Paint N segments in normalized coordinates on the pad.
void SetAttLine(const TAttLine &att) override
Set line attributes.
void SelectDrawable(Int_t device) override
Select the window in which the graphics will go.
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode) override
Paint a simple box.
void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Paint a simple line.
void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2) override
Paint a simple line in normalized coordinates.
void DrawText(Double_t x, Double_t y, const char *text, ETextMode mode) override
Paint text.
void SetDoubleBuffer(Int_t device, Int_t mode) override
Set double buffer mode for specified device.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.