30#include "TGLIncludes.h"
41bool IsGradientFill(
Color_t fillColorIndex)
188 return gVirtualX->InheritsFrom(
"TGCocoa");
217 auto pad =
dynamic_cast<TPad *
>(
gPad);
227 Int_t px = 0, py = 0;
229 pad->XYtoAbsPixel(pad->GetX1(), pad->GetY1(), px, py);
231 py =
gPad->GetWh() - py;
236 glViewport(GLint(px * scale), GLint(py * scale),
237 GLsizei(
gPad->GetWw() * pad->GetAbsWNDC() * scale),
238 GLsizei(
gPad->GetWh() * pad->GetAbsHNDC() * scale));
240 glMatrixMode(GL_PROJECTION);
242 glOrtho(pad->GetX1(), pad->GetX2(), pad->GetY1(), pad->GetY2(), -10., 10.);
244 glMatrixMode(GL_MODELVIEW);
246 glTranslated(0., 0., -1.);
248 ::Error(
"TGLPadPainter::SelectDrawable",
249 "function was called not from TPad or TCanvas code\n");
250 throw std::runtime_error(
"");
288 static bool gl_init =
false;
290 int version = gladLoaderLoadGL();
292 Warning(
"TGLPadPainter::InitPainter",
"GL initalization failed.");
294 Info(
"TGLPadPainter::InitPainter",
"GL initalization successful.");
297 glDisable(GL_DEPTH_TEST);
298 glDisable(GL_CULL_FACE);
299 glDisable(GL_LIGHTING);
302 glViewport(0, 0, GLsizei(
gPad->GetWw()), GLsizei(
gPad->GetWh()));
304 glDepthMask(GL_TRUE);
305 glClearColor(1.,1.,1.,1.);
306 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
307 glDepthMask(GL_FALSE);
309 glMatrixMode(GL_PROJECTION);
312 glOrtho(
gPad->GetX1(),
gPad->GetX2(),
gPad->GetY1(),
gPad->GetY2(), -10., 10.);
314 glMatrixMode(GL_MODELVIEW);
316 glTranslated(0., 0., -1.);
329 glMatrixMode(GL_PROJECTION);
332 glOrtho(
gPad->GetX1(),
gPad->GetX2(),
gPad->GetY1(),
gPad->GetY2(), -10., 10.);
334 glMatrixMode(GL_MODELVIEW);
387 glPointSize((GLfloat)pointSize);
389 glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
411 gPad->UtoAbsPixel(u2),
gPad->VtoAbsPixel(
v2));
420 glVertex2d(
gPad->GetX1() + u1 * xRange,
gPad->GetY1() +
v1 * yRange);
421 glVertex2d(
gPad->GetX1() + u2 * xRange,
gPad->GetY1() +
v2 * yRange);
454 glBegin(GL_LINE_LOOP);
471 assert(
x !=
nullptr &&
"DrawFillArea, parameter 'x' is null");
472 assert(
y !=
nullptr &&
"DrawFillArea, parameter 'y' is null");
478 ::Error(
"TGLPadPainter::DrawFillArea",
479 "invalid number of points in a polygon");
510 for (
Int_t i = 0; i <
n; ++i) {
512 fVs[i * 3 + 1] =
y[i];
519 gluNextContour(t, (GLenum)GLU_UNKNOWN);
521 for (
Int_t i = 0; i <
n; ++i)
522 gluTessVertex(t, &
fVs[i * 3], &
fVs[i * 3]);
531template<
class ValueType>
536 std::vector<TPoint>
xy(
n);
537 for (
Int_t i = 0; i <
n; ++i) {
548 glBegin(GL_LINE_STRIP);
550 for (
Int_t i = 0; i <
n; ++i)
551 glVertex2d(
x[i],
y[i]);
554 glVertex2d(
x[0],
y[0]);
563 glPointSize((GLfloat)pointSize);
565 glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
568 for (
Int_t i = 0; i <
n; ++i)
569 glVertex2d(
x[i],
y[i]);
604 glBegin(GL_LINE_STRIP);
606 for (
Int_t i = 0; i <
n; ++i)
607 glVertex2d(
x1 + u[i] * xRange,
y1 +
v[i] * yRange);
624template<
class ValueType>
627 std::vector<TPoint> poly(
n);
631 for (
Int_t i = 0; i <
n; ++i) {
632 poly[i].fX =
gPad->XtoAbsPixel(
x[i]);
633 poly[i].fY =
gPad->YtoAbsPixel(
y[i]);
642 for (
Int_t i = 0; i <
n; ++i) {
643 poly[i].fX =
gPad->XtoPixel(
x[i]);
644 poly[i].fY = padH -
gPad->YtoPixel(
y[i]);
650 glOrtho(0,
gPad->GetPadWidth(), 0,
gPad->GetPadHeight(), -10., 10.);
652 glMatrixMode(GL_MODELVIEW);
658 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
667 glMatrixMode(GL_MODELVIEW);
699 fontIndex = 20 + shift * 10;
701 fontIndex += shift * 10;
730 glOrtho(0,
gPad->GetAbsWNDC() *
gPad->GetWw(), 0,
gPad->GetAbsHNDC() *
gPad->GetWh(), -10., 10.);
732 glMatrixMode(GL_MODELVIEW);
750 glMatrixMode(GL_MODELVIEW);
818 glMatrixMode(GL_PROJECTION);
829 glMatrixMode(GL_PROJECTION);
840 glMatrixMode(GL_MODELVIEW);
851 glMatrixMode(GL_MODELVIEW);
860 glGetIntegerv(GL_VIEWPORT,
fVp);
885 ::Error(
"TGLPadPainter::DrawImage",
"pixel data is null");
891 ::Error(
"TGLPadPainter::DrawImage",
"invalid image dimentsion");
896 ::Error(
"TGLPadPainter::DrawImage",
"pad is not provided");
905 GLdouble oldPos[4] = {};
907 glGetDoublev(GL_CURRENT_RASTER_POSITION, oldPos);
909 glRasterPos2d(rasterX, rasterY);
911 std::vector<unsigned char> upsideDownImage(4 *
width *
height);
912 const unsigned char *srcLine = pixelData + 4 *
width * (
height - 1);
913 unsigned char *dstLine = &upsideDownImage[0];
915 std::copy(srcLine, srcLine + 4 *
width, dstLine);
919 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
928 glRasterPos2d(oldPos[0], oldPos[1]);
937 auto canvas = pad ? pad->
GetCanvas() :
nullptr;
938 if (!canvas || !image)
942 Int_t x0 = 0, y0 = 0;
948 if (!pad_width || !pad_height) {
949 Error(
"FillImageFromPad",
"Pad dimensions are zero");
955 if ((x0 + pad_width >
width) || (y0 + pad_height >
height)) {
956 Error(
"FillImageFromPad",
"Pad dimensions exceed canvas size");
961 y0 =
height - (y0 + pad_height);
968 Int_t update_arg = 101;
975 canvas->GetCanvasImp()->UpdateDisplay(update_arg,
kFALSE);
979 glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
982 glPixelStorei(GL_PACK_ALIGNMENT, 1);
983 glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
984 glReadBuffer(GL_BACK);
991 glReadPixels(x0, y0,
width,
height, GL_RGBA, GL_UNSIGNED_BYTE, (
char *) buff.data());
996 for (
auto &
pix : buff)
997 pix = ((
pix & 0xff) << 16) | (
pix & 0xff00) | ((
pix & 0xff0000) >> 16) | (
pix & 0xff000000);
1021 assert(
n > 2 &&
"DrawPolygonWithGradient, invalid number of points");
1022 assert(
x !=
nullptr &&
"DrawPolygonWithGradient, parameter 'x' is null");
1023 assert(
y !=
nullptr &&
"DrawPolygonWithGradient, parameter 'y' is null");
1026 assert(grad !=
nullptr &&
"DrawPolygonWithGradient, the current fill color is not a gradient fill");
1037 glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
1039 glStencilFunc(GL_NEVER, 1, 0xFF);
1040 glStencilOp(GL_REPLACE, GL_KEEP, GL_KEEP);
1042 glStencilMask(0xFF);
1043 glClear(GL_STENCIL_BUFFER_BIT);
1048 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
1049 glStencilMask(0x00);
1051 glStencilFunc(GL_EQUAL, 0, 0xFF);
1053 glStencilFunc(GL_EQUAL, 1, 0xFF);
1064 assert(lGrad !=
nullptr &&
"DrawPolygonWithGradient, unknown gradient type");
1074 assert(grad !=
nullptr &&
"DrawGradient, parameter 'grad' is null");
1075 assert(nPoints > 2 &&
"DrawGradient, invalid number of points");
1076 assert(xs !=
nullptr &&
"DrawGradient, parameter 'xs' is null");
1077 assert(ys !=
nullptr &&
"DrawGradient, parameter 'ys' is null");
1080 ::Warning(
"TGLPadPainter::DrawGradient",
1081 "extended radial gradient is not supported");
1092 radius *=
TMath::Max(bbox.fWidth, bbox.fHeight);
1093 center.fX = bbox.fWidth * center.fX + bbox.fXMin;
1094 center.fY = bbox.fHeight * center.fY + bbox.fYMin;
1096 const auto w =
gPad->GetX2() -
gPad->GetX1();
1097 const auto h =
gPad->GetY2() -
gPad->GetY1();
1104 const auto pixelW =
gPad->GetAbsWNDC() *
gPad->GetWw();
1105 const auto pixelH =
gPad->GetAbsHNDC() *
gPad->GetWh();
1110 glMatrixMode(GL_PROJECTION);
1113 glOrtho(0., pixelW, 0., pixelH, -10., 10.);
1116 center.fX =
gPad->XtoPixel(center.fX);
1117 center.fY = pixelH -
gPad->YtoPixel(center.fY);
1123 const Double_t yMin = pixelH -
gPad->YtoPixel(bbox.fYMin);
1124 const Double_t yMax = pixelH -
gPad->YtoPixel(bbox.fYMax);
1131 maxR =
TMath::Sqrt(maxDistX * maxDistX + maxDistY * maxDistY);
1136 const Bool_t solidFillAfter = maxR > radius;
1139 const UInt_t nSlices = 500;
1144 const auto nCircles = nColors + 1 + solidFillAfter;
1150 std::vector<Double_t> circles(nSlices * nCircles * 2);
1154 for (
UInt_t i = 0; i < nColors; ++i) {
1155 const auto circle = &circles[i * nSlices * 2];
1157 const auto r = radius * locations[i];
1158 for (
UInt_t j = 0,
e = nSlices * 2 - 2; j <
e; j += 2) {
1163 circle[(nSlices - 1) * 2] = circle[0];
1164 circle[(nSlices - 1) * 2 + 1] = circle[1];
1169 const auto circle = &circles[nColors * nSlices * 2];
1170 for (
UInt_t j = 0,
e = nSlices * 2 - 2; j <
e; j += 2) {
1175 circle[(nSlices - 1) * 2] = circle[0];
1176 circle[(nSlices - 1) * 2 + 1] = circle[1];
1179 if (solidFillAfter) {
1181 const auto circle = &circles[(nCircles - 1) * nSlices * 2];
1182 for (
UInt_t j = 0,
e = nSlices * 2 - 2; j <
e; j += 2) {
1187 circle[(nSlices - 1) * 2] = circle[0];
1188 circle[(nSlices - 1) * 2 + 1] = circle[1];
1203 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1206 glBegin(GL_TRIANGLE_FAN);
1208 glVertex2d(center.fX, center.fY);
1210 for (
UInt_t i = 0,
e = nSlices * 2; i <
e; i += 2)
1211 glVertex2dv(&circles[i]);
1216 for (
UInt_t i = 0; i < nColors - 1; ++i) {
1217 const Double_t *
const inner = &circles[i * nSlices * 2];
1218 const auto innerRGBA = rgba + i * 4;
1219 const auto outerRGBA = rgba + (i + 1) * 4;
1220 const Double_t *
const outer = &circles[(i + 1) * nSlices * 2];
1227 const Double_t *
const inner = &circles[nSlices * (nColors - 1) * 2];
1228 const auto solidRGBA = rgba + (nColors - 1) * 4;
1229 const Double_t *
const outer = &circles[nSlices * nColors * 2];
1234 if (solidFillAfter) {
1235 const Double_t *
const inner = &circles[nSlices * nColors * 2];
1236 const auto solidRGBA = rgba + (nColors - 1) * 4;
1237 const Double_t *
const outer = &circles[nSlices * (nColors + 1) * 2];
1251 assert(grad !=
nullptr &&
"DrawGradient, parameter 'grad' is null");
1252 assert(
n > 2 &&
"DrawGradient, invalid number of points");
1253 assert(
x !=
nullptr &&
"DrawGradient, parameter 'x' is null");
1254 assert(
y !=
nullptr &&
"DrawGradient, parameter 'y' is null");
1270 glMatrixMode(GL_PROJECTION);
1275 glOrtho(0., pixelW, 0., pixelH, -10., 10.);
1278 glMatrixMode(GL_MODELVIEW);
1290 start.
fX = start.
fX *
w;
1291 start.
fY = start.
fY *
h;
1292 end.
fX = end.
fX *
w;
1293 end.
fY = end.
fY *
h;
1295 start.
fX = start.
fX * bbox.fWidth + bbox.fXMin;
1296 start.
fY = start.
fY * bbox.fHeight + bbox.fYMin;
1297 end.
fX = end.
fX * bbox.fWidth + bbox.fXMin;
1298 end.
fY = end.
fY * bbox.fHeight + bbox.fYMin;
1305 start.
fX =
gPad->XtoPixel(start.
fX);
1306 start.
fY = pixelH -
gPad->YtoPixel(start.
fY);
1308 end.
fY = pixelH -
gPad->YtoPixel(end.
fY);
1311 const Double_t yMin = pixelH -
gPad->YtoPixel(bbox.fYMin);
1312 const Double_t yMax = pixelH -
gPad->YtoPixel(bbox.fYMax);
1322 (end.
fY - start.
fY) * (end.
fY - start.
fY));
1329 gradBoxes[0] = start.
fY -
h;
1331 gradBoxes[i] = startEndLength * colorPositions[i - 1] + start.
fY;
1338 if (end.
fX > start.
fX)
1341 glTranslated(start.
fX, start.
fY, 0.);
1342 glRotated(
angle, 0., 0., 1.);
1343 glTranslated(-start.
fX, -start.
fY, 0.);
1347 const unsigned nEdges = gradBoxes.size();
1353 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1357 rgba + (nColors - 1) * 4, rgba + (nColors - 1) * 4);
1359 for (
unsigned i = 1; i < nEdges - 2; ++i)
1361 xRight, rgba + (i - 1) * 4, rgba + i * 4);
1371 assert(
n > 2 &&
"DrawTesselation, invalid number of points");
1372 assert(
x !=
nullptr &&
"DrawTesselation, parameter 'x' is null");
1373 assert(
y !=
nullptr &&
"DrawTesselation, parameter 'y' is null");
1378 for (
Int_t i = 0; i <
n; ++i) {
1380 fVs[i * 3 + 1] =
y[i];
1381 fVs[i * 3 + 2] = 0.;
1388 gluNextContour(t, (GLenum)GLU_UNKNOWN);
1390 for (
Int_t i = 0; i <
n; ++i)
1391 gluTessVertex(t, &
fVs[i * 3], &
fVs[i * 3]);
short Color_t
Color number (short)
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char)
short Width_t
Line width (short)
float Float_t
Float 4 bytes (float)
short Font_t
Font number (short)
double Double_t
Double 8 bytes.
short SCoord_t
Screen coordinates (short)
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
const Double_t lineWidthTS
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pix
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 r
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 percent
Option_t Option_t TPoint TPoint DrawText
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char text
Option_t Option_t TPoint TPoint const char y1
Int_t gDebug
Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase t...
Double_t GetMaxLineWidth() const
Double_t GetMaxPointSize() const
static void DrawMarkers(UInt_t n, const TPoint *xy, const TAttMarker &attr)
Auxiliary class to draw markers in a gl-pad.
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Width_t GetLineWidth() const
Return the line width.
static Width_t GetMarkerLineWidth(Style_t style)
Internal helper function that returns the line width of the given marker style (0 = filled marker)
TColorGradient extends basic TColor.
const Double_t * GetColors() const
Get colors.
SizeType_t GetNumberOfSteps() const
Get number of steps.
ECoordinateMode GetCoordinateMode() const
Get coordinate mode.
const Double_t * GetColorPositions() const
Get color positions.
void RegisterFont(Int_t size, Int_t file, TGLFont::EMode mode, TGLFont &out)
Provide font with given size, file and FTGL class.
static Int_t GetExtendedFontStartIndex()
static const char * GetFontNameFromId(Int_t)
Get font name from TAttAxis font id.
static TObjArray * GetFontFileArray()
Get id to file name map.
void SetTextAlign(UInt_t align)
void Render(const char *txt, Double_t x, Double_t y, Double_t angle, Double_t mgn) const
virtual void PostRender() const
Reset GL state after FTFont rendering.
virtual void PreRender(Bool_t autoLight=kTRUE, Bool_t lightOn=kFALSE) const
Set-up GL state before FTFont rendering.
void DrawText(Double_t x, Double_t y, const char *text, ETextMode mode) override
Draw text.
void DrawPolyMarkerHelper(Int_t n, const ValueType *x, const ValueType *y)
Poly-marker drawing.
void SetDrawMode(Int_t device, Int_t mode) override
Set drawing mode for specified device.
void DrawPixels(const unsigned char *pixelData, UInt_t width, UInt_t height, Int_t dstX, Int_t dstY, Bool_t enableBlending) override
Int_t ResizeDrawable(Int_t device, UInt_t w, UInt_t h) override
Resize a gVirtualX Pixmap.
void DestroyDrawable(Int_t device) override
Not required at the moment.
void DrawGradient(const TLinearGradient *gradient, Int_t n, const Double_t *x, const Double_t *y)
Rgl::Pad::Tesselator fTess
void SelectGLFont(Font_t font, Float_t size)
Select specified font/size.
void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2) override
Draw line segment in NDC coordinates.
void DrawTextHelper(Double_t x, Double_t y, const Char_t *text, ETextMode mode)
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode) override
Draw filled or hollow box.
void SetAttLine(const TAttLine &att) override
Set line attributes.
void DrawPolygonWithGradient(Int_t n, const Double_t *x, const Double_t *y)
At the moment I assume both linear and radial gradients will work the same way - using a stencil buff...
Bool_t IsInvertMode()
Returns true when invert mode is configured and painter in locked state Used when non-opaque of objec...
void InvalidateCS() override
When TPad::Range for gPad is called, projection must be changed in OpenGL.
void ClearDrawable() override
Do nothing, sub-pads not cleared in GL.
void ClearWindow(Int_t device) override
Clear specified window - calling gVirtualX->ClearWindowW.
void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v) override
Poly line in NDC.
void OnPad(TVirtualPad *) override
Select pad where current painting will be performed.
void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y) override
Draw poly-line in user coordinates.
void DrawImage(TImage *img, Int_t x, Int_t y, Int_t flags=0) override
Draw image on the GL window.
Rgl::Pad::GLLimits fLimits
void SetOpacity(Int_t percent) override
Delegate to gVirtualX.
void DrawTextNDC(Double_t x, Double_t y, const char *text, ETextMode mode) override
Draw text in NDC.
void SetAttFill(const TAttFill &att) override
Set fill attributes.
void InitPainter() override
Init gl-pad painter:
void SelectDrawable(Int_t device) override
For gVirtualX this means select pixmap (or window) and all subsequent drawings will go into this pixm...
Rgl::Pad::PolygonStippleSet fSSet
void SaveViewport()
Extract and save the current viewport.
void CopyDrawable(Int_t device, Int_t px, Int_t py) override
Not required at the moment.
Bool_t IsX11() const override
Returns true when X11 backend is used.
void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y) override
Draw tesselated polygon (probably, outline only).
void DrawPolyMarker(Int_t n, const Double_t *x, const Double_t *y) override
Poly-marker.
void DrawPolyLineHelper(Int_t n, const ValueType *x, const ValueType *y)
Draw poly-line in user coordinates.
Bool_t FillImageFromPad(TImage *image, TVirtualPad *pad) const override
Fill image object with the pixel data from the pad Implements special handling for X11 where ASImage ...
void UpdateDrawable(Int_t mode) override
Call low-level update of selected drawable, redirect to gVirtualX.
void RestoreProjectionMatrix() const
Restore the projection matrix.
void SetAttMarker(const TAttMarker &att) override
Set marker attributes.
void LockPainter() override
Locked state of painter means, that GL context can be invalid, so no GL calls can be executed.
Float_t GetTextMagnitude() const override
Delegate to gVirtualX.
void DrawTesselation(Int_t n, const Double_t *x, const Double_t *y)
Bool_t HasTTFonts() const override
Indicate that TTF can be used for text metrics Drawing done with FTGL which is based on Freetype libr...
Int_t CreateDrawable(UInt_t w, UInt_t h) override
Not required at the moment.
void RestoreModelviewMatrix() const
Restore the modelview matrix.
std::vector< Double_t > fVs
void SaveProjectionMatrix() const
Save the projection matrix.
void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Draw line segment.
Bool_t IsCocoa() const override
Returns true when cocoa backend is used.
void SaveModelviewMatrix() const
Save the modelview matrix.
void RestoreViewport()
Restore the saved viewport.
static void InitializeIfNeeded()
Initialize globals that require other libraries to be initialized.
static void SwapPixelBuffer(UChar_t *buf, UInt_t width, UInt_t height)
Swap rows in pixel buffer returned by glReadPixels function To be able create ASImage from it.
static Float_t GetScreenScalingFactor()
Returns scaling factor between screen points and GL viewport pixels.
An abstract interface to image processing library.
virtual UInt_t * GetArgbArray()
virtual UInt_t GetWidth() const
virtual Bool_t IsValid() const
virtual UInt_t GetHeight() const
const Point & GetEnd() const
Get end.
const Point & GetStart() const
Get start.
void SetAttFill(const TAttFill &att) override
Set fill attributes.
Color_t GetMarkerColor() const override
const TAttText & GetAttText() const override
Get text attributes.
Short_t GetTextAlign() const override
const TAttMarker & GetAttMarker() const override
Get marker attributes.
Style_t GetMarkerStyle() const override
Font_t GetTextFont() const override
Width_t GetLineWidth() const override
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 .
Color_t GetTextColor() const override
Style_t GetLineStyle() const override
const TAttLine & GetAttLine() const override
Get line attributes.
Float_t GetTextSize() const override
The most important graphics class in the ROOT system.
Double_t GetRadius() const
Get radius.
const Point & GetCenter() const
Get center.
EGradientType GetGradientType() const
Get gradient type.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Int_t UtoAbsPixel(Double_t u) const =0
virtual UInt_t GetPadWidth() const =0
virtual UInt_t GetPadHeight() const =0
virtual Int_t VtoAbsPixel(Double_t v) const =0
virtual Int_t GetCanvasID() const =0
virtual TCanvas * GetCanvas() const =0
BoundingRect< ValueType > FindBoundingRect(Int_t nPoints, const ValueType *xs, const ValueType *ys)
void ExtractRGBA(Color_t colorIndex, Float_t *rgba)
void DrawQuadStripWithRadialGradientFill(unsigned nPoints, const Double_t *inner, const Double_t *innerRGBA, const Double_t *outer, const Double_t *outerRGBA)
TODO: is it possible to use GLdouble to avoid problems with Double_t/GLdouble if they are not the sam...
void DrawBoxWithGradientFill(Double_t y1, Double_t y2, Double_t x1, Double_t x2, const Double_t *rgba1, const Double_t *rgba2)
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
constexpr Double_t TwoPi()