|
|
@@ -51,6 +51,10 @@
|
|
|
CGPoint aPoints[2];//坐标点
|
|
|
aPoints[0] =[self to_pdf_point:p_rect point:CGPointMake([self.drawableTemplate[@"x0"] doubleValue]+x, [self.drawableTemplate[@"y0"] doubleValue]+y) contextHeight:flip_height];//坐标1
|
|
|
aPoints[1] =[self to_pdf_point:p_rect point:CGPointMake([self.drawableTemplate[@"x1"] doubleValue]+x, [self.drawableTemplate[@"y1"] doubleValue]+y) contextHeight:flip_height];//坐标2
|
|
|
+
|
|
|
+
|
|
|
+ DebugLog(@"line from %@ to %@",NSStringFromCGPoint(aPoints[0]),NSStringFromCGPoint(aPoints[1]));
|
|
|
+
|
|
|
//CGContextAddLines(CGContextRef c, const CGPoint points[],size_t count)
|
|
|
//points[]坐标数组,和count大小
|
|
|
CGContextAddLines(context, aPoints, 2);//添加线
|