gnomecanvasline.inc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {$IfDef read_interface}
  2. type
  3. PGnomeCanvasLine = ^TGnomeCanvasLine;
  4. TGnomeCanvasLine = record
  5. item : TGnomeCanvasItem;
  6. num_points : longint;
  7. coords : Pdouble;
  8. width : double;
  9. fill_color : guint;
  10. fill_pixel : gulong;
  11. stipple : PGdkBitmap;
  12. cap : TGdkCapStyle;
  13. join : TGdkJoinStyle;
  14. line_style : TGdkLineStyle;
  15. shape_a : double;
  16. shape_b : double;
  17. shape_c : double;
  18. first_coords : Pdouble;
  19. last_coords : Pdouble;
  20. spline_steps : longint;
  21. gc : PGdkGC;
  22. flag0 : word;
  23. fill_rgba : guint32;
  24. fill_svp : PArtSVP;
  25. first_svp : PArtSVP;
  26. last_svp : PArtSVP;
  27. end;
  28. GNOME_CANVAS_LINE = PGnomeCanvasLine;
  29. const
  30. bm__GnomeCanvasLine_width_pixels = $1;
  31. bp__GnomeCanvasLine_width_pixels = 0;
  32. bm__GnomeCanvasLine_first_arrow = $2;
  33. bp__GnomeCanvasLine_first_arrow = 1;
  34. bm__GnomeCanvasLine_last_arrow = $4;
  35. bp__GnomeCanvasLine_last_arrow = 2;
  36. bm__GnomeCanvasLine_smooth = $8;
  37. bp__GnomeCanvasLine_smooth = 3;
  38. function width_pixels(var a : TGnomeCanvasLine) : guint;
  39. procedure set_width_pixels(var a : TGnomeCanvasLine; __width_pixels : guint);
  40. function first_arrow(var a : TGnomeCanvasLine) : guint;
  41. procedure set_first_arrow(var a : TGnomeCanvasLine; __first_arrow : guint);
  42. function last_arrow(var a : TGnomeCanvasLine) : guint;
  43. procedure set_last_arrow(var a : TGnomeCanvasLine; __last_arrow : guint);
  44. function smooth(var a : TGnomeCanvasLine) : guint;
  45. procedure set_smooth(var a : TGnomeCanvasLine; __smooth : guint);
  46. type
  47. PGnomeCanvasLineClass = ^TGnomeCanvasLineClass;
  48. TGnomeCanvasLineClass = record
  49. parent_class : TGnomeCanvasItemClass;
  50. end;
  51. GNOME_CANVAS_LINE_CLASS = PGnomeCanvasLineClass;
  52. function GNOME_TYPE_CANVAS_LINE : TGTKType;
  53. function GNOME_IS_CANVAS_LINE(obj : Pointer) : Boolean;
  54. function GNOME_IS_CANVAS_LINE_CLASS(klass : Pointer) : Boolean;
  55. function gnome_canvas_line_get_type:TGtkType;cdecl;external libgnomeuidll name 'gnome_canvas_line_get_type';
  56. {$EndIf read_interface}
  57. {$Ifdef read_implementation}
  58. function GNOME_TYPE_CANVAS_LINE : TGTKType;
  59. begin
  60. GNOME_TYPE_CANVAS_LINE:=gnome_canvas_line_get_type;
  61. end;
  62. function GNOME_IS_CANVAS_LINE(obj : Pointer) : Boolean;
  63. begin
  64. GNOME_IS_CANVAS_LINE:=(obj<>nil) and GNOME_IS_CANVAS_LINE_CLASS(PGtkTypeObject(obj)^.klass);
  65. end;
  66. function GNOME_IS_CANVAS_LINE_CLASS(klass : Pointer) : Boolean;
  67. begin
  68. GNOME_IS_CANVAS_LINE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GNOME_TYPE_CANVAS_LINE);
  69. end;
  70. function width_pixels(var a : TGnomeCanvasLine) : guint;
  71. begin
  72. width_pixels:=(a.flag0 and bm__GnomeCanvasLine_width_pixels) shr bp__GnomeCanvasLine_width_pixels;
  73. end;
  74. procedure set_width_pixels(var a : TGnomeCanvasLine; __width_pixels : guint);
  75. begin
  76. a.flag0:=a.flag0 or ((__width_pixels shl bp__GnomeCanvasLine_width_pixels) and bm__GnomeCanvasLine_width_pixels);
  77. end;
  78. function first_arrow(var a : TGnomeCanvasLine) : guint;
  79. begin
  80. first_arrow:=(a.flag0 and bm__GnomeCanvasLine_first_arrow) shr bp__GnomeCanvasLine_first_arrow;
  81. end;
  82. procedure set_first_arrow(var a : TGnomeCanvasLine; __first_arrow : guint);
  83. begin
  84. a.flag0:=a.flag0 or ((__first_arrow shl bp__GnomeCanvasLine_first_arrow) and bm__GnomeCanvasLine_first_arrow);
  85. end;
  86. function last_arrow(var a : TGnomeCanvasLine) : guint;
  87. begin
  88. last_arrow:=(a.flag0 and bm__GnomeCanvasLine_last_arrow) shr bp__GnomeCanvasLine_last_arrow;
  89. end;
  90. procedure set_last_arrow(var a : TGnomeCanvasLine; __last_arrow : guint);
  91. begin
  92. a.flag0:=a.flag0 or ((__last_arrow shl bp__GnomeCanvasLine_last_arrow) and bm__GnomeCanvasLine_last_arrow);
  93. end;
  94. function smooth(var a : TGnomeCanvasLine) : guint;
  95. begin
  96. smooth:=(a.flag0 and bm__GnomeCanvasLine_smooth) shr bp__GnomeCanvasLine_smooth;
  97. end;
  98. procedure set_smooth(var a : TGnomeCanvasLine; __smooth : guint);
  99. begin
  100. a.flag0:=a.flag0 or ((__smooth shl bp__GnomeCanvasLine_smooth) and bm__GnomeCanvasLine_smooth);
  101. end;
  102. {$Endif read_implementation}