gnomecanvaspolygon.inc 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {$IfDef read_interface}
  2. type
  3. PGnomeCanvasPolygon = ^TGnomeCanvasPolygon;
  4. TGnomeCanvasPolygon = record
  5. item : TGnomeCanvasItem;
  6. num_points : longint;
  7. coords : Pdouble;
  8. width : double;
  9. fill_color : guint;
  10. outline_color : guint;
  11. fill_pixel : gulong;
  12. outline_pixel : gulong;
  13. fill_stipple : PGdkBitmap;
  14. outline_stipple : PGdkBitmap;
  15. fill_gc : PGdkGC;
  16. outline_gc : PGdkGC;
  17. flag0 : word;
  18. fill_rgba : guint32;
  19. fill_svp : PArtSVP;
  20. outline_rgba : guint32;
  21. outline_svp : PArtSVP;
  22. end;
  23. GNOME_CANVAS_POLYGON = PGnomeCanvasPolygon;
  24. const
  25. bm__GnomeCanvasPolygon_fill_set = $1;
  26. bp__GnomeCanvasPolygon_fill_set = 0;
  27. bm__GnomeCanvasPolygon_outline_set = $2;
  28. bp__GnomeCanvasPolygon_outline_set = 1;
  29. bm__GnomeCanvasPolygon_width_pixels = $4;
  30. bp__GnomeCanvasPolygon_width_pixels = 2;
  31. function fill_set(var a : TGnomeCanvasPolygon) : guint;
  32. procedure set_fill_set(var a : TGnomeCanvasPolygon; __fill_set : guint);
  33. function outline_set(var a : TGnomeCanvasPolygon) : guint;
  34. procedure set_outline_set(var a : TGnomeCanvasPolygon; __outline_set : guint);
  35. function width_pixels(var a : TGnomeCanvasPolygon) : guint;
  36. procedure set_width_pixels(var a : TGnomeCanvasPolygon; __width_pixels : guint);
  37. type
  38. PGnomeCanvasPolygonClass = ^TGnomeCanvasPolygonClass;
  39. TGnomeCanvasPolygonClass = record
  40. parent_class : TGnomeCanvasItemClass;
  41. end;
  42. GNOME_CANVAS_POLYGON_CLASS = PGnomeCanvasPolygonClass;
  43. function GNOME_TYPE_CANVAS_POLYGON : TGTKType;
  44. function GNOME_IS_CANVAS_POLYGON(obj : Pointer) : Boolean;
  45. function GNOME_IS_CANVAS_POLYGON_CLASS(klass : Pointer) : Boolean;
  46. function gnome_canvas_polygon_get_type:TGtkType;cdecl;external libgnomeuidll name 'gnome_canvas_polygon_get_type';
  47. {$EndIf read_interface}
  48. {$Ifdef read_implementation}
  49. function GNOME_TYPE_CANVAS_POLYGON : TGTKType;
  50. begin
  51. GNOME_TYPE_CANVAS_POLYGON:=gnome_canvas_polygon_get_type;
  52. end;
  53. function GNOME_IS_CANVAS_POLYGON(obj : Pointer) : Boolean;
  54. begin
  55. GNOME_IS_CANVAS_POLYGON:=(obj<>nil) and GNOME_IS_CANVAS_POLYGON_CLASS(PGtkTypeObject(obj)^.klass);
  56. end;
  57. function GNOME_IS_CANVAS_POLYGON_CLASS(klass : Pointer) : Boolean;
  58. begin
  59. GNOME_IS_CANVAS_POLYGON_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GNOME_TYPE_CANVAS_POLYGON);
  60. end;
  61. function fill_set(var a : TGnomeCanvasPolygon) : guint;
  62. begin
  63. fill_set:=(a.flag0 and bm__GnomeCanvasPolygon_fill_set) shr bp__GnomeCanvasPolygon_fill_set;
  64. end;
  65. procedure set_fill_set(var a : TGnomeCanvasPolygon; __fill_set : guint);
  66. begin
  67. a.flag0:=a.flag0 or ((__fill_set shl bp__GnomeCanvasPolygon_fill_set) and bm__GnomeCanvasPolygon_fill_set);
  68. end;
  69. function outline_set(var a : TGnomeCanvasPolygon) : guint;
  70. begin
  71. outline_set:=(a.flag0 and bm__GnomeCanvasPolygon_outline_set) shr bp__GnomeCanvasPolygon_outline_set;
  72. end;
  73. procedure set_outline_set(var a : TGnomeCanvasPolygon; __outline_set : guint);
  74. begin
  75. a.flag0:=a.flag0 or ((__outline_set shl bp__GnomeCanvasPolygon_outline_set) and bm__GnomeCanvasPolygon_outline_set);
  76. end;
  77. function width_pixels(var a : TGnomeCanvasPolygon) : guint;
  78. begin
  79. width_pixels:=(a.flag0 and bm__GnomeCanvasPolygon_width_pixels) shr bp__GnomeCanvasPolygon_width_pixels;
  80. end;
  81. procedure set_width_pixels(var a : TGnomeCanvasPolygon; __width_pixels : guint);
  82. begin
  83. a.flag0:=a.flag0 or ((__width_pixels shl bp__GnomeCanvasPolygon_width_pixels) and bm__GnomeCanvasPolygon_width_pixels);
  84. end;
  85. {$Endif read_implementation}