38 bool IsGradientFill(
Color_t fillColorIndex)
305 if (
TPad *pad = dynamic_cast<TPad *>(
gPad)) {
306 Int_t px = 0, py = 0;
308 pad->XYtoAbsPixel(pad->GetX1(), pad->GetY1(), px, py);
310 py =
gPad->GetWh() - py;
315 glViewport(GLint(px * scale), GLint(py * scale),
316 GLsizei(
gPad->GetWw() * pad->GetAbsWNDC() * scale),
317 GLsizei(
gPad->GetWh() * pad->GetAbsHNDC() * scale));
319 glMatrixMode(GL_PROJECTION);
321 glOrtho(pad->GetX1(), pad->GetX2(), pad->GetY1(), pad->GetY2(), -10., 10.);
323 glMatrixMode(GL_MODELVIEW);
325 glTranslated(0., 0., -1.);
327 ::Error(
"TGLPadPainter::SelectDrawable",
328 "function was called not from TPad or TCanvas code\n");
329 throw std::runtime_error(
"");
345 glDisable(GL_DEPTH_TEST);
346 glDisable(GL_CULL_FACE);
347 glDisable(GL_LIGHTING);
350 glViewport(0, 0, GLsizei(
gPad->GetWw()), GLsizei(
gPad->GetWh()));
352 glDepthMask(GL_TRUE);
353 glClearColor(1.,1.,1.,1.);
354 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
355 glDepthMask(GL_FALSE);
357 glMatrixMode(GL_PROJECTION);
360 glOrtho(
gPad->GetX1(),
gPad->GetX2(),
gPad->GetY1(),
gPad->GetY2(), -10., 10.);
362 glMatrixMode(GL_MODELVIEW);
364 glTranslated(0., 0., -1.);
377 glMatrixMode(GL_PROJECTION);
380 glOrtho(
gPad->GetX1(),
gPad->GetX2(),
gPad->GetY1(),
gPad->GetY2(), -10., 10.);
382 glMatrixMode(GL_MODELVIEW);
417 gPad->XtoAbsPixel(x2),
gPad->YtoAbsPixel(y2));
434 glPointSize((GLfloat)pointSize);
436 glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
460 glVertex2d(
gPad->GetX1() + u1 * xRange,
gPad->GetY1() + v1 * yRange);
461 glVertex2d(
gPad->GetX1() + u2 * xRange,
gPad->GetY1() + v2 * yRange);
472 if (IsGradientFill(
gVirtualX->GetFillColor())) {
482 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
483 glRectd(x1, y1, x2, y2);
484 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
488 glRectd(x1, y1, x2, y2);
497 assert(x != 0 &&
"DrawFillArea, parameter 'x' is null");
498 assert(y != 0 &&
"DrawFillArea, parameter 'y' is null");
504 ::Error(
"TGLPadPainter::DrawFillArea",
505 "invalid number of points in a polygon");
509 if (IsGradientFill(
gVirtualX->GetFillColor()))
536 for (
Int_t i = 0; i <
n; ++i) {
538 fVs[i * 3 + 1] = y[i];
545 gluNextContour(t, (GLenum)GLU_UNKNOWN);
547 for (
Int_t i = 0; i <
n; ++i)
548 gluTessVertex(t, &
fVs[i * 3], &
fVs[i * 3]);
563 glBegin(GL_LINE_STRIP);
565 for (
Int_t i = 0; i <
n; ++i)
566 glVertex2d(x[i], y[i]);
569 glVertex2d(x[0], y[0]);
578 glPointSize((GLfloat)pointSize);
580 glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
583 for (
Int_t i = 0; i <
n; ++i)
584 glVertex2d(x[i], y[i]);
600 glBegin(GL_LINE_STRIP);
602 for (
Int_t i = 0; i <
n; ++i)
603 glVertex2f(x[i], y[i]);
606 glVertex2f(x[0], y[0]);
625 glBegin(GL_LINE_STRIP);
627 for (
Int_t i = 0; i <
n; ++i)
628 glVertex2d(x1 + u[i] * xRange, y1 + v[i] * yRange);
636 template<
class ValueType>
637 void ConvertMarkerPoints(
Int_t n,
const ValueType *
x,
const ValueType *
y, std::vector<TPoint> & dst);
648 ConvertMarkerPoints(n, x, y,
fPoly);
659 ConvertMarkerPoints(n, x, y,
fPoly);
673 glOrtho(0,
gPad->GetAbsWNDC() *
gPad->GetWw(), 0,
gPad->GetAbsHNDC() *
gPad->GetWh(), -10., 10.);
675 glMatrixMode(GL_MODELVIEW);
681 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
687 switch (markerStyle) {
725 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
727 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
730 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
732 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
803 glMatrixMode(GL_MODELVIEW);
815 glOrtho(0,
gPad->GetAbsWNDC() *
gPad->GetWw(), 0,
gPad->GetAbsHNDC() *
gPad->GetWh(), -10., 10.);
817 glMatrixMode(GL_MODELVIEW);
830 fontIndex = 20 + shift * 10;
832 fontIndex += shift * 10;
845 glMatrixMode(GL_MODELVIEW);
917 glMatrixMode(GL_PROJECTION);
928 glMatrixMode(GL_PROJECTION);
939 glMatrixMode(GL_MODELVIEW);
950 glMatrixMode(GL_MODELVIEW);
959 glGetIntegerv(GL_VIEWPORT,
fVp);
981 std::vector<unsigned> buff(canvas->GetWw() * canvas->GetWh());
982 glPixelStorei(GL_PACK_ALIGNMENT, 1);
983 glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
986 glReadPixels(0, 0, canvas->GetWw(), canvas->GetWh(), GL_RGBA, GL_UNSIGNED_BYTE, (
char *)&buff[0]);
990 ::Error(
"TGLPadPainter::SaveImage",
"TImage creation failed");
994 image->
DrawRectangle(0, 0, canvas->GetWw(), canvas->GetWh());
998 ::Error(
"TGLPadPainter::SaveImage",
"null argb array in TImage object");
1002 const Int_t nLines = canvas->GetWh();
1003 const Int_t nPixels = canvas->GetWw();
1005 for (
Int_t i = 0; i < nLines; ++i) {
1006 Int_t base = (nLines - 1 - i) * nPixels;
1007 for (
Int_t j = 0; j < nPixels; ++j, ++base) {
1010 const UInt_t pix = buff[base];
1011 const UInt_t bgra = ((pix & 0xff) << 16) | (pix & 0xff00) |
1012 ((pix & 0xff0000) >> 16) | (pix & 0xff000000);
1015 argb[i * nPixels + j] = bgra;
1032 ::Error(
"TGLPadPainter::DrawPixels",
"pixel data is null");
1036 if (std::numeric_limits<UInt_t>::digits >= 32) {
1045 ::Error(
"TGLPadPainter::DrawPixels",
"invalid width");
1051 ::Error(
"TGLPadPainter::DrawPixels",
"invalid height");
1055 if (
TPad *pad = dynamic_cast<TPad *>(
gPad)) {
1060 const Double_t rasterX =
Double_t(dstX) / (pad->GetAbsWNDC() * pad->GetWw()) *
1061 (pad->GetX2() - pad->GetX1()) + pad->GetX1();
1063 const Double_t yRange = pad->GetY2() - pad->GetY1();
1064 const Double_t rasterY = yRange -
Double_t(dstY + height) / (pad->GetAbsHNDC() * pad->GetWh()) * yRange +
1067 GLdouble oldPos[4] = {};
1069 glGetDoublev(GL_CURRENT_RASTER_POSITION, oldPos);
1071 glRasterPos2d(rasterX, rasterY);
1073 std::vector<unsigned char> upsideDownImage(4 * width * height);
1074 const unsigned char *srcLine = pixelData + 4 * width * (height - 1);
1075 unsigned char *dstLine = &upsideDownImage[0];
1076 for (
UInt_t i = 0; i < height; ++i, srcLine -= 4 * width, dstLine += 4 * width)
1077 std::copy(srcLine, srcLine + 4 * width, dstLine);
1079 if (enableBlending) {
1081 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1084 glDrawPixels(width, height,
GL_BGRA, GL_UNSIGNED_BYTE, &upsideDownImage[0]);
1087 glDisable(GL_BLEND);
1090 glRasterPos2d(oldPos[0], oldPos[1]);
1092 ::Error(
"TGLPadPainter::DrawPixels",
"no pad found to draw");
1104 assert(n > 2 &&
"DrawPolygonWithGradient, invalid number of points");
1105 assert(x != 0 &&
"DrawPolygonWithGradient, parameter 'x' is null");
1106 assert(y != 0 &&
"DrawPolygonWithGradient, parameter 'y' is null");
1108 assert(dynamic_cast<TColorGradient *>(
gROOT->GetColor(
gVirtualX->GetFillColor())) != 0 &&
1109 "DrawPolygonWithGradient, the current fill color is not a gradient fill");
1122 glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
1124 glStencilFunc(GL_NEVER, 1, 0xFF);
1125 glStencilOp(GL_REPLACE, GL_KEEP, GL_KEEP);
1127 glStencilMask(0xFF);
1128 glClear(GL_STENCIL_BUFFER_BIT);
1133 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
1134 glStencilMask(0x00);
1136 glStencilFunc(GL_EQUAL, 0, 0xFF);
1138 glStencilFunc(GL_EQUAL, 1, 0xFF);
1149 assert(lGrad != 0 &&
"DrawPolygonWithGradient, unknown gradient type");
1159 assert(grad != 0 &&
"DrawGradient, parameter 'grad' is null");
1160 assert(nPoints > 2 &&
"DrawGradient, invalid number of points");
1161 assert(xs != 0 &&
"DrawGradient, parameter 'xs' is null");
1162 assert(ys != 0 &&
"DrawGradient, parameter 'ys' is null");
1165 ::Warning(
"TGLPadPainter::DrawGradient",
1166 "extended radial gradient is not supported");
1177 radius *=
TMath::Max(bbox.fWidth, bbox.fHeight);
1178 center.fX = bbox.fWidth * center.fX + bbox.fXMin;
1179 center.fY = bbox.fHeight * center.fY + bbox.fYMin;
1181 const auto w =
gPad->GetX2() -
gPad->GetX1();
1182 const auto h =
gPad->GetY2() -
gPad->GetY1();
1189 const auto pixelW =
gPad->GetAbsWNDC() *
gPad->GetWw();
1190 const auto pixelH =
gPad->GetAbsHNDC() *
gPad->GetWh();
1195 glMatrixMode(GL_PROJECTION);
1198 glOrtho(0., pixelW, 0., pixelH, -10., 10.);
1201 center.fX =
gPad->XtoPixel(center.fX);
1202 center.fY = pixelH -
gPad->YtoPixel(center.fY);
1208 const Double_t yMin = pixelH -
gPad->YtoPixel(bbox.fYMin);
1209 const Double_t yMax = pixelH -
gPad->YtoPixel(bbox.fYMax);
1216 maxR =
TMath::Sqrt(maxDistX * maxDistX + maxDistY * maxDistY);
1221 const Bool_t solidFillAfter = maxR > radius;
1224 const UInt_t nSlices = 500;
1229 const auto nCircles = nColors + 1 + solidFillAfter;
1235 std::vector<Double_t> circles(nSlices * nCircles * 2);
1239 for (
UInt_t i = 0; i < nColors; ++i) {
1240 const auto circle = &circles[i * nSlices * 2];
1242 const auto r = radius * locations[i];
1243 for (
UInt_t j = 0,
e = nSlices * 2 - 2; j <
e; j += 2) {
1244 circle[j] = center.fX +
r *
TMath::Cos(angle * j);
1245 circle[j + 1] = center.fY +
r *
TMath::Sin(angle * j);
1248 circle[(nSlices - 1) * 2] = circle[0];
1249 circle[(nSlices - 1) * 2 + 1] = circle[1];
1254 const auto circle = &circles[nColors * nSlices * 2];
1255 for (
UInt_t j = 0,
e = nSlices * 2 - 2; j <
e; j += 2) {
1256 circle[j] = center.fX + radius *
TMath::Cos(angle * j);
1257 circle[j + 1] = center.fY + radius *
TMath::Sin(angle * j);
1260 circle[(nSlices - 1) * 2] = circle[0];
1261 circle[(nSlices - 1) * 2 + 1] = circle[1];
1264 if (solidFillAfter) {
1266 const auto circle = &circles[(nCircles - 1) * nSlices * 2];
1267 for (
UInt_t j = 0,
e = nSlices * 2 - 2; j <
e; j += 2) {
1268 circle[j] = center.fX + maxR *
TMath::Cos(angle * j);
1269 circle[j + 1] = center.fY + maxR *
TMath::Sin(angle * j);
1272 circle[(nSlices - 1) * 2] = circle[0];
1273 circle[(nSlices - 1) * 2 + 1] = circle[1];
1288 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1291 glBegin(GL_TRIANGLE_FAN);
1293 glVertex2d(center.fX, center.fY);
1295 for (
UInt_t i = 0,
e = nSlices * 2; i <
e; i += 2)
1296 glVertex2dv(&circles[i]);
1301 for (
UInt_t i = 0; i < nColors - 1; ++i) {
1302 const Double_t *
const inner = &circles[i * nSlices * 2];
1303 const auto innerRGBA = rgba + i * 4;
1304 const auto outerRGBA = rgba + (i + 1) * 4;
1305 const Double_t *
const outer = &circles[(i + 1) * nSlices * 2];
1312 glBegin(GL_QUAD_STRIP);
1313 const Double_t *
const inner = &circles[nSlices * (nColors - 1) * 2];
1314 const auto solidRGBA = rgba + (nColors - 1) * 4;
1315 const Double_t *
const outer = &circles[nSlices * nColors * 2];
1320 if (solidFillAfter) {
1321 glBegin(GL_QUAD_STRIP);
1322 const Double_t *
const inner = &circles[nSlices * nColors * 2];
1323 const auto solidRGBA = rgba + (nColors - 1) * 4;
1324 const Double_t *
const outer = &circles[nSlices * (nColors + 1) * 2];
1338 assert(grad != 0 &&
"DrawGradient, parameter 'grad' is null");
1339 assert(n > 2 &&
"DrawGradient, invalid number of points");
1340 assert(x != 0 &&
"DrawGradient, parameter 'x' is null");
1341 assert(y != 0 &&
"DrawGradient, parameter 'y' is null");
1357 glMatrixMode(GL_PROJECTION);
1362 glOrtho(0., pixelW, 0., pixelH, -10., 10.);
1365 glMatrixMode(GL_MODELVIEW);
1377 start.
fX = start.
fX * w;
1378 start.
fY = start.
fY *
h;
1379 end.
fX = end.
fX * w;
1380 end.
fY = end.
fY *
h;
1382 start.
fX = start.
fX * bbox.fWidth + bbox.fXMin;
1383 start.
fY = start.
fY * bbox.fHeight + bbox.fYMin;
1384 end.
fX = end.
fX * bbox.fWidth + bbox.fXMin;
1385 end.
fY = end.
fY * bbox.fHeight + bbox.fYMin;
1392 start.
fX =
gPad->XtoPixel(start.
fX);
1393 start.
fY = pixelH -
gPad->YtoPixel(start.
fY);
1395 end.
fY = pixelH -
gPad->YtoPixel(end.
fY);
1398 const Double_t yMin = pixelH -
gPad->YtoPixel(bbox.fYMin);
1399 const Double_t yMax = pixelH -
gPad->YtoPixel(bbox.fYMax);
1409 (end.
fY - start.
fY) * (end.
fY - start.
fY));
1416 gradBoxes[0] = start.
fY -
h;
1418 gradBoxes[i] = startEndLength * colorPositions[i - 1] + start.
fY;
1425 if (end.
fX > start.
fX)
1428 glTranslated(start.
fX, start.
fY, 0.);
1429 glRotated(angle, 0., 0., 1.);
1430 glTranslated(-start.
fX, -start.
fY, 0.);
1434 const unsigned nEdges = gradBoxes.size();
1440 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1444 rgba + (nColors - 1) * 4, rgba + (nColors - 1) * 4);
1446 for (
unsigned i = 1; i < nEdges - 2; ++i)
1448 xRight, rgba + (i - 1) * 4, rgba + i * 4);
1458 assert(n > 2 &&
"DrawTesselation, invalid number of points");
1459 assert(x != 0 &&
"DrawTesselation, parameter 'x' is null");
1460 assert(y != 0 &&
"DrawTesselation, parameter 'y' is null");
1465 for (
Int_t i = 0; i <
n; ++i) {
1467 fVs[i * 3 + 1] = y[i];
1468 fVs[i * 3 + 2] = 0.;
1475 gluNextContour(t, (GLenum)GLU_UNKNOWN);
1477 for (
Int_t i = 0; i <
n; ++i)
1478 gluTessVertex(t, &
fVs[i * 3], &
fVs[i * 3]);
1487 template<
class ValueType>
1488 void ConvertMarkerPoints(
Int_t n,
const ValueType *
x,
const ValueType *
y, std::vector<TPoint> & dst)
1493 for (
Int_t i = 0; i <
n; ++i) {
1494 dst[i].fX =
gPad->XtoPixel(x[i]);
1495 dst[i].fY = padH -
gPad->YtoPixel(y[i]);
void DrawOpenTrianlgeDown(UInt_t n, const TPoint *xy) const
Double_t GetRadius() const
Get radius.
void SelectDrawable(Int_t device)
For gVirtualX this means select pixmap (or window) and all subsequent drawings will go into this pixm...
void DrawCircle(UInt_t n, const TPoint *xy) const
Color_t GetLineColor() const
Delegate to gVirtualX.
virtual void PreRender(Bool_t autoLight=kTRUE, Bool_t lightOn=kFALSE) const
Set-up GL state before FTFont rendering.
void Render(const char *txt, Double_t x, Double_t y, Double_t angle, Double_t mgn) const
void DrawOpenFourTrianglesX(UInt_t n, const TPoint *xy) const
void SetTextColor(Color_t tcolor)
Delegate to gVirtualX.
Rgl::Pad::PolygonStippleSet fSSet
const Point & GetCenter() const
Get center.
static const char * GetFontNameFromId(Int_t)
Get font name from TAttAxis font id.
void LockPainter()
Locked state of painter means, that GL context can be invalid, so no GL calls can be executed...
const Double_t * GetColorPositions() const
Get color positions.
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...
ECoordinateMode GetCoordinateMode() const
Get coordinate mode.
constexpr Double_t TwoPi()
void DrawX(UInt_t n, const TPoint *xy) const
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...
Int_t CreateDrawable(UInt_t w, UInt_t h)
Not required at the moment.
virtual void WriteImage(const char *, EImageFileTypes=TImage::kUnknown)
void DrawFullFourTrianglesPlus(UInt_t n, const TPoint *xy) const
void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y)
Draw poly-line in user coordinates.
void SetTextSize(Float_t tsize)
Delegate to gVirtualX.
SizeType_t GetNumberOfSteps() const
Get number of steps.
void ClearDrawable()
Not required at the moment.
Rgl::Pad::Tesselator fTess
virtual UInt_t * GetArgbArray()
static Float_t GetScreenScalingFactor()
Returns scaling factor between screen points and GL viewport pixels.
void SetLineColor(Color_t lcolor)
Delegate to gVirtualX.
const Point & GetEnd() const
Get end.
void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)
Draw line segment in NDC coordinates.
void DrawText(Double_t x, Double_t y, const char *text, ETextMode mode)
Draw text.
Float_t GetTextAngle() const
Delegate to gVirtualX.
void DrawFourSquaresPlus(UInt_t n, const TPoint *xy) const
void SaveModelviewMatrix() const
Save the modelview matrix.
void DrawBoxWithGradientFill(Double_t y1, Double_t y2, Double_t x1, Double_t x2, const Double_t *rgba1, const Double_t *rgba2)
Define a radial color gradient.
void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v)
Poly line in NDC.
void DrawGradient(const TLinearGradient *gradient, Int_t n, const Double_t *x, const Double_t *y)
void SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) const
Using TImage save frame-buffer contents as a picture.
void SetTextSizePixels(Int_t npixels)
Delegate to gVirtualX.
void InvalidateCS()
When TPad::Range for gPad is called, projection must be changed in OpenGL.
void RegisterFont(Int_t size, Int_t file, TGLFont::EMode mode, TGLFont &out)
Provide font with given size, file and FTGL class.
static const double x2[5]
void RestoreModelviewMatrix() const
Restore the modelview matrix.
void DrawFullCrossX(UInt_t n, const TPoint *xy) const
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode)
Draw filled or hollow box.
void ExtractRGBA(Color_t colorIndex, Float_t *rgba)
Rgl::Pad::MarkerPainter fMarker
virtual void DrawRectangle(UInt_t, UInt_t, UInt_t, UInt_t, const char *="#000000", UInt_t=1)
std::vector< TPoint > fPoly
void RestoreViewport()
Restore the saved viewport.
void SaveProjectionMatrix() const
Save the projection matrix.
void DrawOpenCrossX(UInt_t n, const TPoint *xy) const
void DrawOctagonCross(UInt_t n, const TPoint *xy) const
Short_t GetTextAlign() const
Delegate to gVirtualX.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
void DrawPolyMarker()
Poly-marker.
void Error(const char *location, const char *msgfmt,...)
Font_t GetTextFont() const
Delegate to gVirtualX.
void DrawOpenStar(UInt_t n, const TPoint *xy) const
Full star pentagone.
void DrawPixels(const unsigned char *pixelData, UInt_t width, UInt_t height, Int_t dstX, Int_t dstY, Bool_t enableBlending)
void DrawOpenFourTrianglesPlus(UInt_t n, const TPoint *xy) const
void DrawDot(UInt_t n, const TPoint *xy) const
Simple 1-pixel dots.
void DrawFullThreeTriangles(UInt_t n, const TPoint *xy) const
const Double_t lineWidthTS
void DrawOpenThreeTriangles(UInt_t n, const TPoint *xy) const
static void InitializeIfNeeded()
Initialize globals that require other libraries to be initialized.
void DrawFullFourTrianglesX(UInt_t n, const TPoint *xy) const
void DrawFullDotMedium(UInt_t n, const TPoint *xy) const
"Delegating" part of TGLPadPainter.
void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y)
Draw tesselated polygon (probably, outline only).
void DrawPlus(UInt_t n, const TPoint *xy) const
Color_t GetTextColor() const
Delegate to gVirtualX.
void DrawFullStar(UInt_t n, const TPoint *xy) const
Full star pentagone.
The most important graphics class in the ROOT system.
char * Form(const char *fmt,...)
void CopyDrawable(Int_t device, Int_t px, Int_t py)
Not required at the moment.
void SaveViewport()
Extract and save the current viewport.
Rgl::Pad::GLLimits fLimits
void DrawFullDotSmall(UInt_t n, const TPoint *xy) const
void SetFillStyle(Style_t fstyle)
Delegate to gVirtualX.
void Warning(const char *location, const char *msgfmt,...)
void DrawOpenDiamondCross(UInt_t n, const TPoint *xy) const
void DrawFullTrianlgeDown(UInt_t n, const TPoint *xy) const
void SetTextAlign(Short_t align)
Delegate to gVirtualX.
std::vector< Double_t > fVs
void DrawTextNDC(Double_t x, Double_t y, const char *text, ETextMode mode)
Draw text in NDC.
Color_t GetFillColor() const
Delegate to gVirtualX.
Define a linear color gradient.
void SetFillColor(Color_t fcolor)
Delegate to gVirtualX.
void DrawFourSquaresX(UInt_t n, const TPoint *xy) const
Double_t GetMaxLineWidth() const
Double_t GetMaxPointSize() const
Style_t GetLineStyle() const
Delegate to gVirtualX.
const Point & GetStart() const
Get start.
void SetTextAngle(Float_t tangle)
Delegate to gVirtualX.
static const double x1[5]
void RestoreProjectionMatrix() const
Restore the projection matrix.
void DrawDiamond(UInt_t n, const TPoint *xy) const
void DrawStar(UInt_t n, const TPoint *xy) const
void DrawFullDotLarge(UInt_t n, const TPoint *xy) const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void InitPainter()
Init gl-pad painter:
void DrawFullSquare(UInt_t n, const TPoint *xy) const
BoundingRect< ValueType > FindBoundingRect(Int_t nPoints, const ValueType *xs, const ValueType *ys)
constexpr Double_t RadToDeg()
void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw line segment.
Style_t GetFillStyle() const
Delegate to gVirtualX.
virtual void PostRender() const
Reset GL state after FTFont rendering.
void DrawOpenDoubleDiamond(UInt_t n, const TPoint *xy) const
EGradientType GetGradientType() const
Get gradient type.
Short_t Max(Short_t a, Short_t b)
Bool_t IsTransparent() const
Delegate to gVirtualX.
void DrawTextHelper(Double_t x, Double_t y, const Char_t *text, ETextMode mode)
void DrawOpenCross(UInt_t n, const TPoint *xy) const
void DrawFullTrianlgeUp(UInt_t n, const TPoint *xy) const
const Double_t * GetColors() const
Get colors.
Int_t GetEntries() const
Return the number of objects in array (i.e.
void SetTextFont(Font_t tfont)
Delegate to gVirtualX.
void SetLineStyle(Style_t lstyle)
Delegate to gVirtualX.
void SetLineWidth(Width_t lwidth)
Delegate to gVirtualX.
static TObjArray * GetFontFileArray()
Get id to file name map.
static Int_t GetExtendedFontStartIndex()
void DestroyDrawable(Int_t device)
Not required at the moment.
Float_t GetTextSize() const
Delegate to gVirtualX.
Double_t Sqrt(Double_t x)
static TImage * Create()
Create an image.
TColorGradient extends basic TColor.
void DrawFullCross(UInt_t n, const TPoint *xy) const
void SetOpacity(Int_t percent)
Delegate to gVirtualX.
Float_t GetTextMagnitude() const
Delegate to gVirtualX.
Width_t GetLineWidth() const
Delegate to gVirtualX.
void DrawFullDiamond(UInt_t n, const TPoint *xy) const
void DrawFullDoubleDiamond(UInt_t n, const TPoint *xy) const
void DrawTesselation(Int_t n, const Double_t *x, const Double_t *y)
void DrawOpenSquareDiagonal(UInt_t n, const TPoint *xy) const
virtual TCanvas * GetCanvas() const =0