128 if (ix1<0 || ix2 <0 || iy1 < 0 || iy2 <0)
return;
149 if ((fillis == 3) || (fillis == 2)) {
151 x[0] = x1;
y[0] = y1;
152 x[1] = x2;
y[1] = y1;
153 x[2] = x2;
y[2] = y2;
154 x[3] = x1;
y[3] = y2;
157 if ((fillsi > 0) && (fillsi < 26)) {
158 x[0] = x1;
y[0] = y1;
159 x[1] = x2;
y[1] = y1;
160 x[2] = x2;
y[2] = y2;
161 x[3] = x1;
y[3] = y2;
197 bordersize = bordersize < 1 ? 1 : bordersize;
202 lo =
gROOT->GetColor(10);
209 Short_t pxl,pyl,pxt,pyt,px1,py1,px2,py2;
213 if (px1 < px2) {pxl = px1; pxt = px2;}
214 else {pxl = px2; pxt = px1;}
215 if (py1 > py2) {pyl = py1; pyt = py2;}
216 else {pyl = py2; pyt = py1;}
218 if (bordersize == 1) {
230 col =
gROOT->GetColor(light);
232 col =
gROOT->GetColor(10);
235 fImage->DrawBox(pxl, pyl, pxt, pyt,
241 frame[0].
fX = pxl; frame[0].
fY = pyl;
242 frame[1].
fX = pxl + bordersize; frame[1].
fY = pyl - bordersize;
243 frame[2].
fX = pxl + bordersize; frame[2].
fY = pyt + bordersize;
244 frame[3].
fX = pxt - bordersize; frame[3].
fY = pyt + bordersize;
245 frame[4].
fX = pxt; frame[4].
fY = pyt;
246 frame[5].
fX = pxl; frame[5].
fY = pyt;
248 if (mode == -1) col = lo;
253 frame[0].
fX = pxl; frame[0].
fY = pyl;
254 frame[1].
fX = pxl + bordersize; frame[1].
fY = pyl - bordersize;
255 frame[2].
fX = pxt - bordersize; frame[2].
fY = frame[1].
fY;
256 frame[3].
fX = frame[2].
fX; frame[3].
fY = pyt + bordersize;
257 frame[4].
fX = pxt; frame[4].
fY = pyt;
258 frame[5].
fX = pxt; frame[5].
fY = pyl;
260 if (mode == -1) col =
hi;
294 else if (ms >= 9 && ms <= 19)
298 const Int_t kBASEMARKER = 8;
300 if (ms == 6) msize *= 0.2;
301 if (ms == 7) msize *= 0.3;
318 if (ms==20) ms = 120;
648 std::vector<char> dashList;
668 std::unique_ptr<TObjArray> tokens(st.
Tokenize(
" "));
671 for (
int j = 0; j < tokens->GetEntries(); j++) {
673 sscanf(tokens->At(j)->GetName(),
"%d", &it);
674 dashList.emplace_back((
char)(it/4));
698 fImage->DrawDashLine(px1, py1, px2, py2, dashList.size(), dashList.data(),
705 if (!
line && ((fais == 3) || (fais == 2)) && (fasi > 100))
708 std::vector<TPoint>
pt(
n+1);
710 for (
UInt_t i = 0; i <
n; i++) {
717 const char *stipple = (fais == 3) && (fasi > 0) && (fasi < 26) ? (
const char*)
gStipples[fasi] :
nullptr;
757 const char* pDash,
const char* col,
UInt_t thick)
762 for (
Int_t i = 1; i < nn; i++) {
766 fImage->DrawDashLine(x0, y0,
x,
y, nDash, pDash, col, thick);
785 w = w *
gPad->GetAbsWNDC();
786 h =
h *
gPad->GetAbsHNDC();
788 fImage->DrawRectangle(0, 0, w,
h,
"#ffffffff");
const unsigned char gStipples[26][32]
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
short Width_t
Line width (short).
bool Bool_t
Boolean (0=false, 1=true) (bool).
short Short_t
Signed Short integer 2 bytes (short).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
externTVirtualPS * gVirtualPS
Style_t fFillStyle
Fill area style.
Color_t fFillColor
Fill area color.
Width_t fLineWidth
Line width.
Style_t fLineStyle
Line style.
Color_t fLineColor
Line color.
Color_t fMarkerColor
Marker color.
static Style_t GetMarkerStyleBase(Style_t style)
Size_t fMarkerSize
Marker size.
Style_t fMarkerStyle
Marker style.
static Width_t GetMarkerLineWidth(Style_t style)
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
Color_t fTextColor
Text color.
Float_t fTextAngle
Text angle.
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
Font_t fTextFont
Text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Short_t fTextAlign
Text alignment.
Float_t fTextSize
Text size.
const char * AsHexString() const
void NewPage() override
new page
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Draw a Box.
void CellArrayEnd() override
Cell array end.
std::vector< UInt_t > fCellArrayColors
void DrawDashPolyLine(Int_t npoints, TPoint *pt, UInt_t nDash, const char *pDash, const char *col, UInt_t thick)
draw dashed polyline
TImageDump()
Default constructor.
Int_t YtoPixel(Double_t y)
y to pixel
void CellArrayFill(Int_t r, Int_t g, Int_t b) override
Cell array fill.
~TImageDump() override
destructor
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y) override
not used
void Open(const char *filename, Int_t type=-111) override
Open a image file.
void Close(Option_t *opt="") override
Close a image file.
void DrawPS(Int_t n, Float_t *xw, Float_t *yw) override
not used
void Text(Double_t x, Double_t y, const char *string) override
Draw text.
void SetColor(Float_t r, Float_t g, Float_t b) override
Set color with its R G B components.
void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark, Int_t light) override
Draw a Frame around a box.
Int_t fType
PostScript workstation type.
Int_t XtoPixel(Double_t x)
x to pixel
Int_t fY0
offset of selected pad to canvas
void TextUrl(Double_t x, Double_t y, const char *string, const char *url) override
Draw text with URL.
void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2) override
cell array begin
static TImage * Create()
Create an image.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
TVirtualPS(const TVirtualPS &)=delete
Double_t Floor(Double_t x)
Rounds x downward, returning the largest integral value that is not greater than x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.