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");
64 CGFloat* lengths =
new CGFloat[
n];
65 for (
int i = 0;
i <
n;
i++)
67 CGContextSetLineDash(ctx, 0, lengths,
n);
70 CGContextSetLineDash(ctx, 0, NULL, 0);
78 assert(ctx != 0 &&
"SetLineStyle, ctx parameter is null");
80 static Int_t dashed[2] = {3, 3};
81 static Int_t dotted[2] = {1, 2};
82 static Int_t dasheddotted[4] = {3, 4, 1, 4};
86 }
else if (lstyle == 2) {
88 }
else if (lstyle == 3) {
90 }
else if (lstyle == 4) {
97 std::vector<Int_t> linestyle(nt);
98 for (
Int_t j = 0; j<nt; j++) {
100 sscanf(((
TObjString*)tokens->
At(j))->GetName(),
"%d", &it);
101 linestyle[j] = (
Int_t)(it/4);
114 assert(ctx != 0 &&
"SetLineWidth, ctx parameter is null");
120 CGContextSetLineWidth(ctx,
width ?
width : 1);
126 assert(ctx != 0 &&
"DrawLine, ctx parameter is null");
128 CGContextBeginPath(ctx);
129 CGContextMoveToPoint(ctx,
x1,
y1);
130 CGContextAddLineToPoint(ctx,
x2,
y2);
131 CGContextStrokePath(ctx);
142 assert(ctx != 0 &&
"DrawPolyLine, ctx parameter is null");
143 assert(
xy != 0 &&
"DrawPolyLine, xy parameter is null");
145 CGContextBeginPath(ctx);
146 CGContextMoveToPoint(ctx,
xy[0].fX,
xy[0].fY);
148 CGContextAddLineToPoint(ctx,
xy[
i].fX,
xy[
i].fY);
150 if (
xy[
n - 1].fX ==
xy[0].fX &&
xy[
n - 1].fY ==
xy[0].fY)
151 CGContextClosePath(ctx);
153 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
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.
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...