User class with custom JavaScript painter in the web canvas.
#include <iostream>
double fX[3] = {0, 0, 0};
double fY[3] = {0, 0, 0};
public:
void SetPoints(
double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
{
}
{
return;
if (*opt == 'f')
gPad->PaintFillAreaNDC(3, fX, fY, opt);
else
gPad->PaintPolyLineNDC(3, fX, fY, opt);
}
};
{
printf(
"Custom JS module will NOT be provided for TTriangle class\n");
printf(
"No interactive features will be available\n");
printf(
"TTriangle::Paint() method will be used for object painting - also in web case\n");
} else {
#ifdef __CLING__
printf(
"Please run this script in compiled mode by running \".x triangle.cxx+\"\n");
printf(
"Requires to properly generate dictionary for TTriangle class\n");
return;
#endif
auto pos = fdir.find("triangle.cxx");
if (pos != std::string::npos)
fdir.resize(pos);
else
fdir =
gROOT->GetTutorialsDir() + std::string(
"/webcanv/");
}
tr1->SetPoints(0.4, 0.5, 0.8, 0.3, 0.8, 0.7);
tr2->SetPoints(0.2, 0.2, 0.2, 0.6, 0.5, 0.4);
tr3->SetPoints(0.4, 0.8, 0.6, 0.8, 0.5, 0.2);
}
#define ClassDefOverride(name, id)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char y1
static void AddServerLocation(const std::string &server_prefix, const std::string &files_path)
Configure server location which can be used for loading of custom scripts or files When THttpServer i...
Fill Area Attributes class.
virtual void Modify()
Change current fill area attributes if necessary.
virtual void Modify()
Change current line attributes if necessary.
The TNamed class is the base class for all named ROOT classes.
static void AddCustomClass(const std::string &clname, bool with_derived=false)
Assign custom class.
static void SetCustomScripts(const std::string &src)
Configures custom script for canvas.