38bool IsGradientFill(
Color_t fillColorIndex)
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);
353 glClearColor(1.,1.,1.,1.);
354 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
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];
547 for (
Int_t i = 0; i <
n; ++i)
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]);
602 for (
Int_t i = 0; i <
n; ++i)
603 glVertex2f(
x[i],
y[i]);
606 glVertex2f(
x[0],
y[0]);
627 for (
Int_t i = 0; i <
n; ++i)
628 glVertex2d(
x1 + u[i] * xRange, y1 +
v[i] * yRange);
636template<
class ValueType>
637void 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());
995 UInt_t *argb = image->GetArgbArray();
998 ::Error(
"TGLPadPainter::SaveImage",
"null argb array in TImage object");
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");
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 +
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");
1109 "DrawPolygonWithGradient, the current fill color is not a gradient fill");
1124 glStencilFunc(GL_NEVER, 1, 0xFF);
1125 glStencilOp(GL_REPLACE, GL_KEEP, GL_KEEP);
1127 glStencilMask(0xFF);
1128 glClear(GL_STENCIL_BUFFER_BIT);
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);
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];
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) {
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.;
1477 for (
Int_t i = 0; i <
n; ++i)
1487template<
class ValueType>
1488void 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]);
GLAPI void GLAPIENTRY gluBeginPolygon(GLUtesselator *tess)
GLAPI void GLAPIENTRY gluNextContour(GLUtesselator *tess, GLenum type)
GLAPI void GLAPIENTRY gluEndPolygon(GLUtesselator *tess)
GLAPI void GLAPIENTRY gluTessVertex(GLUtesselator *tess, GLdouble *location, GLvoid *data)
static const double x2[5]
static const double x1[5]
include TDocParser_001 C image html pict1_TDocParser_001 png width
void Error(const char *location, const char *msgfmt,...)
void Warning(const char *location, const char *msgfmt,...)
const Double_t lineWidthTS
char * Form(const char *fmt,...)
Double_t GetMaxLineWidth() const
Double_t GetMaxPointSize() const
void DrawOpenThreeTriangles(UInt_t n, const TPoint *xy) const
void DrawFullCrossX(UInt_t n, const TPoint *xy) const
void DrawFullDotSmall(UInt_t n, const TPoint *xy) const
void DrawOpenSquareDiagonal(UInt_t n, const TPoint *xy) const
void DrawOpenDoubleDiamond(UInt_t n, const TPoint *xy) const
void DrawFullFourTrianglesX(UInt_t n, const TPoint *xy) const
void DrawFullDotLarge(UInt_t n, const TPoint *xy) const
void DrawFullThreeTriangles(UInt_t n, const TPoint *xy) const
void DrawCircle(UInt_t n, const TPoint *xy) const
void DrawFullFourTrianglesPlus(UInt_t n, const TPoint *xy) const
void DrawOpenCross(UInt_t n, const TPoint *xy) const
void DrawFullCross(UInt_t n, const TPoint *xy) const
void DrawFullTrianlgeDown(UInt_t n, const TPoint *xy) const
void DrawOpenStar(UInt_t n, const TPoint *xy) const
Full star pentagone.
void DrawX(UInt_t n, const TPoint *xy) const
void DrawPlus(UInt_t n, const TPoint *xy) const
void DrawFullTrianlgeUp(UInt_t n, const TPoint *xy) const
void DrawFullSquare(UInt_t n, const TPoint *xy) const
void DrawOpenFourTrianglesPlus(UInt_t n, const TPoint *xy) const
void DrawStar(UInt_t n, const TPoint *xy) const
void DrawFullDoubleDiamond(UInt_t n, const TPoint *xy) const
void DrawOpenCrossX(UInt_t n, const TPoint *xy) const
void DrawDot(UInt_t n, const TPoint *xy) const
Simple 1-pixel dots.
void DrawOctagonCross(UInt_t n, const TPoint *xy) const
void DrawFourSquaresX(UInt_t n, const TPoint *xy) const
void DrawFourSquaresPlus(UInt_t n, const TPoint *xy) const
void DrawFullDotMedium(UInt_t n, const TPoint *xy) const
void DrawDiamond(UInt_t n, const TPoint *xy) const
void DrawFullStar(UInt_t n, const TPoint *xy) const
Full star pentagone.
void DrawOpenTrianlgeDown(UInt_t n, const TPoint *xy) const
void DrawFullDiamond(UInt_t n, const TPoint *xy) const
void DrawOpenFourTrianglesX(UInt_t n, const TPoint *xy) const
void DrawOpenDiamondCross(UInt_t n, const TPoint *xy) const
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 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.
"Delegating" part of TGLPadPainter.
Float_t GetTextMagnitude() const
Delegate to gVirtualX.
Color_t GetFillColor() const
Delegate to gVirtualX.
Color_t GetLineColor() const
Delegate to gVirtualX.
Font_t GetTextFont() const
Delegate to gVirtualX.
Style_t GetLineStyle() const
Delegate to gVirtualX.
void SetTextSize(Float_t tsize)
Delegate to gVirtualX.
void DrawTextNDC(Double_t x, Double_t y, const char *text, ETextMode mode)
Draw text in NDC.
void SetTextSizePixels(Int_t npixels)
Delegate to gVirtualX.
void DrawGradient(const TLinearGradient *gradient, Int_t n, const Double_t *x, const Double_t *y)
Rgl::Pad::Tesselator fTess
void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)
Draw line segment in NDC coordinates.
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode)
Draw filled or hollow box.
std::vector< TPoint > fPoly
void DrawTextHelper(Double_t x, Double_t y, const Char_t *text, ETextMode mode)
void SetLineColor(Color_t lcolor)
Delegate to gVirtualX.
Int_t CreateDrawable(UInt_t w, UInt_t h)
Not required at the moment.
void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v)
Poly line in NDC.
void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y)
Draw poly-line in user coordinates.
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...
void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw line segment.
void SetFillColor(Color_t fcolor)
Delegate to gVirtualX.
void SetTextFont(Font_t tfont)
Delegate to gVirtualX.
void SetTextAlign(Short_t align)
Delegate to gVirtualX.
Rgl::Pad::GLLimits fLimits
Float_t GetTextSize() const
Delegate to gVirtualX.
void DrawPixels(const unsigned char *pixelData, UInt_t width, UInt_t height, Int_t dstX, Int_t dstY, Bool_t enableBlending)
Rgl::Pad::PolygonStippleSet fSSet
Rgl::Pad::MarkerPainter fMarker
void SetLineStyle(Style_t lstyle)
Delegate to gVirtualX.
void DrawPolyMarker()
Poly-marker.
void SaveViewport()
Extract and save the current viewport.
Width_t GetLineWidth() const
Delegate to gVirtualX.
void LockPainter()
Locked state of painter means, that GL context can be invalid, so no GL calls can be executed.
void SetFillStyle(Style_t fstyle)
Delegate to gVirtualX.
void ClearDrawable()
Not required at the moment.
Short_t GetTextAlign() const
Delegate to gVirtualX.
Bool_t IsTransparent() const
Delegate to gVirtualX.
void SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) const
Using TImage save frame-buffer contents as a picture.
void SetOpacity(Int_t percent)
Delegate to gVirtualX.
Style_t GetFillStyle() const
Delegate to gVirtualX.
void RestoreProjectionMatrix() const
Restore the projection matrix.
void SetLineWidth(Width_t lwidth)
Delegate to gVirtualX.
void SetTextColor(Color_t tcolor)
Delegate to gVirtualX.
Float_t GetTextAngle() const
Delegate to gVirtualX.
void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y)
Draw tesselated polygon (probably, outline only).
void DrawText(Double_t x, Double_t y, const char *text, ETextMode mode)
Draw text.
void CopyDrawable(Int_t device, Int_t px, Int_t py)
Not required at the moment.
void DrawTesselation(Int_t n, const Double_t *x, const Double_t *y)
void SelectDrawable(Int_t device)
For gVirtualX this means select pixmap (or window) and all subsequent drawings will go into this pixm...
void InitPainter()
Init gl-pad painter:
Color_t GetTextColor() const
Delegate to gVirtualX.
void DestroyDrawable(Int_t device)
Not required at the moment.
void InvalidateCS()
When TPad::Range for gPad is called, projection must be changed in OpenGL.
void RestoreModelviewMatrix() const
Restore the modelview matrix.
std::vector< Double_t > fVs
void SaveProjectionMatrix() const
Save the projection matrix.
void SetTextAngle(Float_t tangle)
Delegate to gVirtualX.
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 Float_t GetScreenScalingFactor()
Returns scaling factor between screen points and GL viewport pixels.
static TImage * Create()
Create an image.
Define a linear color gradient.
const Point & GetEnd() const
Get end.
const Point & GetStart() const
Get start.
The most important graphics class in the ROOT system.
Define a radial color gradient.
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 UInt_t GetWh() const =0
virtual UInt_t GetWw() 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)
Short_t Max(Short_t a, Short_t b)
Double_t Sqrt(Double_t x)
constexpr Double_t RadToDeg()
Conversion from radian to degree:
constexpr Double_t TwoPi()