27 std::vector<TPoint> markerShape;
40 CGContextScaleCTM(ctx, 1. / scaleFactor, 1. / scaleFactor);
44 CGContextSetLineJoin(ctx, kCGLineJoinMiter);
45 CGContextSetLineCap(ctx, kCGLineCapButt);
47 CGContextSetLineJoin(ctx, kCGLineJoinRound);
48 CGContextSetLineCap(ctx, kCGLineCapRound);
53 for (
unsigned i = 0; i < nPoints; ++i)
54 CGContextFillRect(ctx, CGRectMake(
xy[i].fX,
xy[i].fY, 1, 1));
58 for (
unsigned i = 0; i < nPoints; ++i) {
59 const CGRect
rect = CGRectMake(
xy[i].fX - markerSize * 0.5,
xy[i].fY - markerSize * 0.5, markerSize, markerSize);
61 CGContextStrokeEllipseInRect(ctx,
rect);
63 CGContextFillEllipseInRect(ctx,
rect);
69 for (
unsigned i = 0; i < nPoints; ++i) {
72 CGContextBeginPath(ctx);
73 CGContextMoveToPoint(ctx,
x + markerShape[0].fX,
y + markerShape[0].fY);
74 for (std::size_t
p = 1;
p < markerShape.size();
p++)
75 CGContextAddLineToPoint(ctx,
x + markerShape[
p].fX,
y + markerShape[
p].fY);
78 CGContextStrokePath(ctx);
80 CGContextFillPath(ctx);
84 for (
unsigned i = 0; i < nPoints; ++i) {
87 for (std::size_t
p = 0;
p < markerShape.size();
p += 2) {
88 CGContextBeginPath(ctx);
89 CGContextMoveToPoint(ctx,
x + markerShape[
p].fX,
y + markerShape[
p].fY);
90 CGContextAddLineToPoint(ctx,
x + markerShape[
p + 1].fX,
y + markerShape[
p + 1].fY);
91 CGContextStrokePath(ctx);
97 for (
unsigned i = 0; i < nPoints; ++i) {
100 for(std::size_t t = 0; t < markerShape.size(); t += 3) {
101 CGContextBeginPath(ctx);
102 CGContextMoveToPoint(ctx,
x + markerShape[t].fX,
y + markerShape[t].fY);
103 for (std::size_t
p = t + 1;
p < t + 3;
p++)
104 CGContextAddLineToPoint(ctx,
x + markerShape[
p].fX,
y + markerShape[
p].fY);
105 CGContextFillPath(ctx);
111 CGContextSetLineJoin(ctx, kCGLineJoinMiter);
112 CGContextSetLineCap(ctx, kCGLineCapButt);