31 assert(ctx != 0 &&
"SetLineColor, ctx parameter is null");
41 const CGFloat alpha = color->
GetAlpha();
43 color->
GetRGB(rgb[0], rgb[1], rgb[2]);
44 CGContextSetRGBStrokeColor(ctx, rgb[0], rgb[1], rgb[2], alpha);
61 assert(ctx != 0 &&
"SetLineType, ctx parameter is null");
65 for (
int i = 0; i <
n; i++)
67 CGContextSetLineDash(ctx, 0, lengths,
n);
69 CGContextSetLineDash(ctx, 0, NULL, 0);
77 assert(ctx != 0 &&
"SetLineStyle, ctx parameter is null");
79 static Int_t dashed[2] = {3, 3};
80 static Int_t dotted[2] = {1, 2};
81 static Int_t dasheddotted[4] = {3, 4, 1, 4};
85 }
else if (lstyle == 2) {
87 }
else if (lstyle == 3) {
89 }
else if (lstyle == 4) {
96 std::vector<Int_t> linestyle(nt);
97 for (
Int_t j = 0; j<nt; j++) {
99 sscanf(((
TObjString*)tokens->
At(j))->GetName(),
"%d", &it);
100 linestyle[j] = (
Int_t)(it/4);
113 assert(ctx != 0 &&
"SetLineWidth, ctx parameter is null");
119 CGContextSetLineWidth(ctx,
width ?
width : 1);
125 assert(ctx != 0 &&
"DrawLine, ctx parameter is null");
127 CGContextBeginPath(ctx);
128 CGContextMoveToPoint(ctx,
x1,
y1);
129 CGContextAddLineToPoint(ctx,
x2,
y2);
130 CGContextStrokePath(ctx);
141 assert(ctx != 0 &&
"DrawPolyLine, ctx parameter is null");
142 assert(
xy != 0 &&
"DrawPolyLine, xy parameter is null");
144 CGContextBeginPath(ctx);
145 CGContextMoveToPoint(ctx,
xy[0].fX,
xy[0].fY);
146 for (
Int_t i = 1; i <
n; ++i)
147 CGContextAddLineToPoint(ctx,
xy[i].fX,
xy[i].fY);
149 if (
xy[
n - 1].fX ==
xy[0].fX &&
xy[
n - 1].fY ==
xy[0].fY)
150 CGContextClosePath(ctx);
152 CGContextStrokePath(ctx);
Option_t Option_t SetLineWidth
Option_t Option_t SetLineColor
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint xy
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char DrawLine
Option_t Option_t TPoint TPoint const char y1
R__EXTERN TStyle * gStyle
The color creation and management class.
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Int_t GetEntries() const override
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const override
Collectable string class.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
const char * GetLineStyleString(Int_t i=1) const
Return line style string (used by PostScript).
void DrawPolyLine(CGContextRef ctx, Int_t n, TPoint *xy)
void SetLineType(CGContextRef ctx, Int_t n, Int_t *dash)
void SetLineStyle(CGContextRef ctx, Int_t lstyle)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...