NSBezierPath.inc 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. { Parsed from AppKit.framework NSBezierPath.h }
  2. {$ifdef TYPES}
  3. type
  4. NSBezierPathPtr = ^NSBezierPath;
  5. {$endif}
  6. {$ifdef TYPES}
  7. type
  8. NSLineCapStyle = NSUInteger;
  9. NSLineCapStylePtr = ^NSLineCapStyle;
  10. const
  11. NSButtLineCapStyle = 0;
  12. NSRoundLineCapStyle = 1;
  13. NSSquareLineCapStyle = 2;
  14. type
  15. NSLineJoinStyle = NSUInteger;
  16. NSLineJoinStylePtr = ^NSLineJoinStyle;
  17. const
  18. NSMiterLineJoinStyle = 0;
  19. NSRoundLineJoinStyle = 1;
  20. NSBevelLineJoinStyle = 2;
  21. type
  22. NSWindingRule = NSUInteger;
  23. NSWindingRulePtr = ^NSWindingRule;
  24. const
  25. NSNonZeroWindingRule = 0;
  26. NSEvenOddWindingRule = 1;
  27. type
  28. NSBezierPathElement = NSUInteger;
  29. NSBezierPathElementPtr = ^NSBezierPathElement;
  30. const
  31. NSMoveToBezierPathElement = 0;
  32. NSLineToBezierPathElement = 1;
  33. NSCurveToBezierPathElement = 2;
  34. NSClosePathBezierPathElement = 3;
  35. {$endif}
  36. {$ifdef CLASSES}
  37. type
  38. NSBezierPath = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
  39. private
  40. _elementCount: NSInteger;
  41. _elementMax: NSInteger;
  42. _head: PATHSEGMENTPtr;
  43. _lastSubpathIndex: NSInteger;
  44. _extraSegments: pointer;
  45. _lineWidth: CGFloat;
  46. _controlPointBounds: NSRect;
  47. _miterLimit: CGFloat;
  48. _flatness: CGFloat;
  49. _dashedLinePattern: CGFloatPtr;
  50. _dashedLineCount: NSUInteger;
  51. _dashedLinePhase: CGFloat;
  52. _path: pointer;
  53. _extraSegmentCount: NSInteger;
  54. _extraSegmentMax: NSInteger;
  55. {$if not defined(__LP64__)}
  56. _private:array[0..1] of id;
  57. {$endif}
  58. _bpFlags: bitpacked record
  59. case byte of
  60. 0: (_anonBitField__bpFlags0: cuint);
  61. 1: (
  62. _flags: 0..((1 shl 8)-1);
  63. _pathState: 0..((1 shl 2)-1);
  64. _unused: 0..((1 shl 22)-1);
  65. );
  66. end;
  67. public
  68. class function bezierPath: NSBezierPath; message 'bezierPath';
  69. class function bezierPathWithRect (rect: NSRect): NSBezierPath; message 'bezierPathWithRect:';
  70. class function bezierPathWithOvalInRect (rect: NSRect): NSBezierPath; message 'bezierPathWithOvalInRect:';
  71. class function bezierPathWithRoundedRect_xRadius_yRadius (rect: NSRect; xRadius: CGFloat; yRadius: CGFloat): NSBezierPath; message 'bezierPathWithRoundedRect:xRadius:yRadius:'; { available in 10_5 }
  72. class procedure fillRect (rect: NSRect); message 'fillRect:';
  73. class procedure strokeRect (rect: NSRect); message 'strokeRect:';
  74. class procedure clipRect (rect: NSRect); message 'clipRect:';
  75. class procedure strokeLineFromPoint_toPoint (point1: NSPoint; point2: NSPoint); message 'strokeLineFromPoint:toPoint:';
  76. class procedure drawPackedGlyphs_atPoint (packedGlyphs: PChar; point: NSPoint); message 'drawPackedGlyphs:atPoint:';
  77. class procedure setDefaultMiterLimit (limit: CGFloat); message 'setDefaultMiterLimit:';
  78. class function defaultMiterLimit: CGFloat; message 'defaultMiterLimit';
  79. class procedure setDefaultFlatness (flatness: CGFloat); message 'setDefaultFlatness:';
  80. class function defaultFlatness: CGFloat; message 'defaultFlatness';
  81. class procedure setDefaultWindingRule (windingRule: NSWindingRule); message 'setDefaultWindingRule:';
  82. class function defaultWindingRule: NSWindingRule; message 'defaultWindingRule';
  83. class procedure setDefaultLineCapStyle (lineCapStyle: NSLineCapStyle); message 'setDefaultLineCapStyle:';
  84. class function defaultLineCapStyle: NSLineCapStyle; message 'defaultLineCapStyle';
  85. class procedure setDefaultLineJoinStyle (lineJoinStyle: NSLineJoinStyle); message 'setDefaultLineJoinStyle:';
  86. class function defaultLineJoinStyle: NSLineJoinStyle; message 'defaultLineJoinStyle';
  87. class procedure setDefaultLineWidth (lineWidth: CGFloat); message 'setDefaultLineWidth:';
  88. class function defaultLineWidth: CGFloat; message 'defaultLineWidth';
  89. procedure moveToPoint (point: NSPoint); message 'moveToPoint:';
  90. procedure lineToPoint (point: NSPoint); message 'lineToPoint:';
  91. procedure curveToPoint_controlPoint1_controlPoint2 (endPoint: NSPoint; controlPoint1: NSPoint; controlPoint2: NSPoint); message 'curveToPoint:controlPoint1:controlPoint2:';
  92. procedure closePath; message 'closePath';
  93. procedure removeAllPoints; message 'removeAllPoints';
  94. procedure relativeMoveToPoint (point: NSPoint); message 'relativeMoveToPoint:';
  95. procedure relativeLineToPoint (point: NSPoint); message 'relativeLineToPoint:';
  96. procedure relativeCurveToPoint_controlPoint1_controlPoint2 (endPoint: NSPoint; controlPoint1: NSPoint; controlPoint2: NSPoint); message 'relativeCurveToPoint:controlPoint1:controlPoint2:';
  97. procedure setLineWidth(newValue: CGFloat); message 'setLineWidth:';
  98. function lineWidth: CGFloat; message 'lineWidth';
  99. procedure setLineCapStyle(newValue: NSLineCapStyle); message 'setLineCapStyle:';
  100. function lineCapStyle: NSLineCapStyle; message 'lineCapStyle';
  101. procedure setLineJoinStyle(newValue: NSLineJoinStyle); message 'setLineJoinStyle:';
  102. function lineJoinStyle: NSLineJoinStyle; message 'lineJoinStyle';
  103. procedure setWindingRule(newValue: NSWindingRule); message 'setWindingRule:';
  104. function windingRule: NSWindingRule; message 'windingRule';
  105. procedure setMiterLimit(newValue: CGFloat); message 'setMiterLimit:';
  106. function miterLimit: CGFloat; message 'miterLimit';
  107. procedure setFlatness(newValue: CGFloat); message 'setFlatness:';
  108. function flatness: CGFloat; message 'flatness';
  109. procedure getLineDash_count_phase (pattern: CGFloatPtr; count: NSIntegerPtr; phase: CGFloatPtr); message 'getLineDash:count:phase:';
  110. procedure setLineDash_count_phase (pattern: CGFloatPtr; count: NSInteger; phase: CGFloat); message 'setLineDash:count:phase:';
  111. procedure stroke; message 'stroke';
  112. procedure fill; message 'fill';
  113. procedure addClip; message 'addClip';
  114. procedure setClip; message 'setClip';
  115. function bezierPathByFlatteningPath: NSBezierPath; message 'bezierPathByFlatteningPath';
  116. function bezierPathByReversingPath: NSBezierPath; message 'bezierPathByReversingPath';
  117. procedure transformUsingAffineTransform (transform: NSAffineTransform); message 'transformUsingAffineTransform:';
  118. function isEmpty: ObjCBOOL; message 'isEmpty';
  119. function currentPoint: NSPoint; message 'currentPoint';
  120. function controlPointBounds: NSRect; message 'controlPointBounds';
  121. function bounds: NSRect; message 'bounds';
  122. function elementCount: NSInteger; message 'elementCount';
  123. function elementAtIndex_associatedPoints (index: NSInteger; points: NSPointArray): NSBezierPathElement; message 'elementAtIndex:associatedPoints:';
  124. function elementAtIndex (index: NSInteger): NSBezierPathElement; message 'elementAtIndex:';
  125. procedure setAssociatedPoints_atIndex (points: NSPointArray; index: NSInteger); message 'setAssociatedPoints:atIndex:';
  126. procedure appendBezierPath (path: NSBezierPath); message 'appendBezierPath:';
  127. procedure appendBezierPathWithRect (rect: NSRect); message 'appendBezierPathWithRect:';
  128. procedure appendBezierPathWithPoints_count (points: NSPointArray; count: NSInteger); message 'appendBezierPathWithPoints:count:';
  129. procedure appendBezierPathWithOvalInRect (rect: NSRect); message 'appendBezierPathWithOvalInRect:';
  130. procedure appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise (center: NSPoint; radius: CGFloat; startAngle: CGFloat; endAngle: CGFloat; clockwise: ObjCBOOL); message 'appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:';
  131. procedure appendBezierPathWithArcWithCenter_radius_startAngle_endAngle (center: NSPoint; radius: CGFloat; startAngle: CGFloat; endAngle: CGFloat); message 'appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:';
  132. procedure appendBezierPathWithArcFromPoint_toPoint_radius (point1: NSPoint; point2: NSPoint; radius: CGFloat); message 'appendBezierPathWithArcFromPoint:toPoint:radius:';
  133. procedure appendBezierPathWithGlyph_inFont (glyph: NSGlyph; font: NSFont); message 'appendBezierPathWithGlyph:inFont:';
  134. procedure appendBezierPathWithGlyphs_count_inFont (glyphs: NSGlyphPtr; count: NSInteger; font: NSFont); message 'appendBezierPathWithGlyphs:count:inFont:';
  135. procedure appendBezierPathWithPackedGlyphs (packedGlyphs: PChar); message 'appendBezierPathWithPackedGlyphs:';
  136. procedure appendBezierPathWithRoundedRect_xRadius_yRadius (rect: NSRect; xRadius: CGFloat; yRadius: CGFloat); message 'appendBezierPathWithRoundedRect:xRadius:yRadius:'; { available in 10_5 }
  137. function containsPoint (point: NSPoint): ObjCBOOL; message 'containsPoint:';
  138. { Adopted protocols }
  139. function copyWithZone (zone: NSZonePtr): id; message 'copyWithZone:';
  140. procedure encodeWithCoder (aCoder: NSCoder); message 'encodeWithCoder:';
  141. function initWithCoder (aDecoder: NSCoder): id; message 'initWithCoder:';
  142. end;
  143. type
  144. NSBezierPathDeprecated = objccategory external (NSBezierPath)
  145. function cachesBezierPath: ObjCBOOL; message 'cachesBezierPath'; deprecated 'in 10_0, 10_0';
  146. procedure setCachesBezierPath (flag: ObjCBOOL); message 'setCachesBezierPath:'; deprecated 'in 10_0, 10_0';
  147. end;
  148. {$endif}