1----------------------------------------------------------------------- 2-- GtkAda - Ada95 binding for Gtk+/Gnome -- 3-- -- 4-- Copyright (C) 2010-2013, AdaCore -- 5-- -- 6-- This library is free software; you can redistribute it and/or -- 7-- modify it under the terms of the GNU General Public -- 8-- License as published by the Free Software Foundation; either -- 9-- version 2 of the License, or (at your option) any later version. -- 10-- -- 11-- This library is distributed in the hope that it will be useful, -- 12-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- 13-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- 14-- General Public License for more details. -- 15-- -- 16-- You should have received a copy of the GNU General Public -- 17-- License along with this library; if not, write to the -- 18-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- 19-- Boston, MA 02111-1307, USA. -- 20-- -- 21-- As a special exception, if other files instantiate generics from -- 22-- this unit, or you link this unit with other files to produce an -- 23-- executable, this unit does not by itself cause the resulting -- 24-- executable to be covered by the GNU General Public License. This -- 25-- exception does not however invalidate any other reasons why the -- 26-- executable file might be covered by the GNU Public License. -- 27----------------------------------------------------------------------- 28 29-- <description> 30-- A Cairo_Pattern is the paintbrush with which cairo draws. The primary use 31-- of patterns is as the source for all cairo drawing operations. 32-- 33-- A cairo pattern is created by using one of the many constructors, of the 34-- form Cairo_Pattern.Create_<type> or implicitly through 35-- Cairo.Set_Source_<type> subprograms. 36-- </description> 37-- 38-- <c_version>1.8.8</c_version> 39-- <group>Cairo</group> 40 41with System; 42 43package Cairo.Pattern is 44 45 -------------------------------- 46 -- Pattern creation functions -- 47 -------------------------------- 48 49 -- Cairo_Pattern_Type is used to describe the type of a given pattern. 50 -- 51 -- The type of a pattern is determined by the function used to create 52 -- it. The Cairo.Pattern.Create_Rgb and Cairo.Pattern.Create_Rgba 53 -- functions create Solid patterns. The remaining 54 -- Cairo.Pattern.Create_<> functions map to pattern types in obvious 55 -- ways. 56 -- 57 -- The pattern type can be queried with Cairo.Pattern.Get_Type 58 -- 59 -- Most Cairo_Pattern functions can be called with a pattern of any type, 60 -- (though trying to change the extend or filter for a solid pattern will 61 -- have no effect). A notable exception is Cairo.Pattern.Add_Color_Stop_Rgb 62 -- and Cairo.Pattern.Add_Color_Stop_Rgba which must only be called with 63 -- gradient patterns (either Linear or Radial). Otherwise the pattern will 64 -- be shutdown and put into an error state. 65 -- 66 -- New entries may be added in future versions. 67 -- 68 -- Since: 1.2 69 type Cairo_Pattern_Type is 70 (Cairo_Pattern_Type_Solid, 71 -- The pattern is a solid (uniform) color. It may be opaque or 72 -- translucent. 73 74 Cairo_Pattern_Type_Surface, 75 -- The pattern is a based on a surface (an image). 76 77 Cairo_Pattern_Type_Linear, 78 -- The pattern is a linear gradient. 79 80 Cairo_Pattern_Type_Radial 81 -- The pattern is a radial gradient. 82 ); 83 pragma Convention (C, Cairo_Pattern_Type); 84 85 -- Cairo_extend is used to describe how pattern color/alpha will be 86 -- determined for areas "outside" the pattern's natural area, (for 87 -- example, outside the surface bounds or outside the gradient 88 -- geometry). 89 -- 90 -- The default extend mode is CAIRO_EXTEND_NONE for surface patterns 91 -- and CAIRO_EXTEND_PAD for gradient patterns. 92 -- 93 -- New entries may be added in future versions. 94 type Cairo_Extend is 95 (Cairo_Extend_None, 96 -- Pixels outside of the source pattern are fully transparent 97 98 Cairo_Extend_Repeat, 99 -- The pattern is tiled by repeating 100 101 Cairo_Extend_Reflect, 102 -- The pattern is tiled by reflecting at the edges (Implemented for 103 -- surface patterns since 1.6) 104 105 Cairo_Extend_Pad 106 -- Pixels outside of the pattern copy 107 -- the closest pixel from the source (Since 1.2; but only 108 -- implemented for surface patterns since 1.6) 109 ); 110 pragma Convention (C, Cairo_Extend); 111 112 -- Cairo_filter is used to indicate what filtering should be 113 -- applied when reading pixel values from patterns. See 114 -- Cairo.Pattern.Set_Source for indicating the desired filter to be 115 -- used with a particular pattern. 116 type Cairo_Filter is 117 (Cairo_Filter_Fast, 118 -- A high-performance filter, with quality similar to 119 -- Cairo_Filter_Nearest 120 121 Cairo_Filter_Good, 122 -- A reasonable-performance filter, with quality similar to 123 -- Cairo_Filter_Bilinear 124 125 Cairo_Filter_Best, 126 -- The highest-quality available, performance may 127 -- not be suitable for interactive use. 128 129 Cairo_Filter_Nearest, 130 -- Nearest-neighbor filtering 131 132 Cairo_Filter_Bilinear, 133 -- Linear interpolation in two dimensions 134 135 Cairo_Filter_Gaussian 136 -- This filter value is currently unimplemented, and should not be used 137 -- in current code. 138 ); 139 pragma Convention (C, Cairo_Filter); 140 141 function Create_Rgb 142 (Red : Gdouble; 143 Green : Gdouble; 144 Blue : Gdouble) 145 return Cairo_Pattern; 146 -- Red: Red component of the color 147 -- Green: Green component of the color 148 -- Blue: Blue component of the color 149 -- 150 -- Creates a new Cairo_Pattern corresponding to an opaque color. The 151 -- color components are floating point numbers in the range 0 to 1. 152 -- If the values passed in are outside that range, they will be 153 -- clamped. 154 -- 155 -- Return value: the newly created Cairo_Pattern if successful, or 156 -- an error pattern in case of no memory. The caller owns the 157 -- returned object and should call Cairo.Pattern.Destroy when 158 -- finished with it. 159 -- 160 -- This function will always return a valid pointer, but if an error 161 -- occurred the pattern status will be set to an error. To inspect 162 -- the status of a pattern use Cairo.Pattern.Status. 163 164 function Create_Rgba 165 (Red : Gdouble; 166 Green : Gdouble; 167 Blue : Gdouble; 168 Alpha : Gdouble) 169 return Cairo_Pattern; 170 -- Red: Red component of the color 171 -- Green: Green component of the color 172 -- Blue: Blue component of the color 173 -- Alpha: Alpha component of the color 174 -- 175 -- Creates a new Cairo_Pattern corresponding to a translucent color. 176 -- The color components are floating point numbers in the range 0 to 177 -- 1. If the values passed in are outside that range, they will be 178 -- clamped. 179 -- 180 -- Return value: the newly created Cairo_Pattern if successful, or 181 -- an error pattern in case of no memory. The caller owns the 182 -- returned object and should call Cairo.Pattern.Destroy when 183 -- finished with it. 184 -- 185 -- This function will always return a valid pointer, but if an error 186 -- occurred the pattern status will be set to an error. To inspect 187 -- the status of a pattern use Cairo.Pattern.Status. 188 189 function Create_For_Surface 190 (Surface : Cairo_Surface) 191 return Cairo_Pattern; 192 -- Surface: the Surface 193 -- 194 -- Create a new Cairo_Pattern for the given surface. 195 -- 196 -- Return value: the newly created Cairo_Pattern if successful, or 197 -- an error pattern in case of no memory. The caller owns the 198 -- returned object and should call Cairo.Pattern.Destroy when 199 -- finished with it. 200 -- 201 -- This function will always return a valid pointer, but if an error 202 -- occurred the pattern status will be set to an error. To inspect 203 -- the status of a pattern use Cairo.Pattern.Status. 204 205 function Create_Linear 206 (X0 : Gdouble; 207 Y0 : Gdouble; 208 X1 : Gdouble; 209 Y1 : Gdouble) 210 return Cairo_Pattern; 211 -- X0: x coordinate of the start point 212 -- Y0: y coordinate of the start point 213 -- X1: x coordinate of the end point 214 -- Y1: y coordinate of the end point 215 -- 216 -- Create a new linear gradient Cairo_Pattern along the line defined 217 -- by (X0, Y0) and (X1, Y1). Before using the gradient pattern, a 218 -- number of color stops should be defined using 219 -- Cairo.Pattern.Add_Color_Stop_Rgb or 220 -- Cairo.Pattern.Add_Color_Stop_Rgba. 221 -- 222 -- Note: The coordinates here are in pattern space. For a new pattern, 223 -- pattern space is identical to user space, but the relationship 224 -- between the spaces can be changed with Cairo.Pattern.Set_Matrix. 225 -- 226 -- Return value: the newly created Cairo_Pattern if successful, or 227 -- an error pattern in case of no memory. The caller owns the 228 -- returned object and should call Cairo.Pattern.Destroy when 229 -- finished with it. 230 -- 231 -- This function will always return a valid pointer, but if an error 232 -- occurred the pattern status will be set to an error. To inspect 233 -- the status of a pattern use Cairo.Pattern.Status. 234 235 function Create_Radial 236 (Cx0 : Gdouble; 237 Cy0 : Gdouble; 238 Radius0 : Gdouble; 239 Cx1 : Gdouble; 240 Cy1 : Gdouble; 241 Radius1 : Gdouble) 242 return Cairo_Pattern; 243 -- Cx0: X coordinate for the center of the start circle 244 -- Cy0: Y coordinate for the center of the start circle 245 -- Radius0: radius of the start circle 246 -- Cx1: X coordinate for the center of the end circle 247 -- Cy1: Y coordinate for the center of the end circle 248 -- Radius1: radius of the end circle 249 -- 250 -- Creates a new radial gradient Cairo_Pattern between the two circles 251 -- defined by (Cx0, Cy0, Radius0) and (Cx1, Cy1, Radius1). Before using the 252 -- gradient pattern, a number of color stops should be defined using 253 -- Cairo.Pattern.Add_Color_Stop_Rgb or Cairo.Pattern.Add_Color_Stop_Rgba. 254 -- 255 -- Note: The coordinates here are in pattern space. For a new pattern, 256 -- pattern space is identical to user space, but the relationship 257 -- between the spaces can be changed with Cairo.Pattern.Set_Matrix. 258 -- 259 -- Return value: the newly created Cairo_Pattern if successful, or 260 -- an error pattern in case of no memory. The caller owns the 261 -- returned object and should call Cairo.Pattern.Destroy when 262 -- finished with it. 263 -- 264 -- This function will always return a valid pointer, but if an error 265 -- occurred the pattern status will be set to an error. To inspect 266 -- the status of a pattern use Cairo.Pattern.Status. 267 268 function Reference (Pattern : Cairo_Pattern) return Cairo_Pattern; 269 -- Pattern: a Cairo_Pattern 270 -- 271 -- Increases the reference count on pattern by one. This prevents 272 -- pattern from being destroyed until a matching call to 273 -- Cairo.Pattern.Destroy is made. 274 -- 275 -- The number of references to a Cairo_Pattern can be get using 276 -- Cairo.Pattern.Get_Reference_Count. 277 -- 278 -- Return value: the referenced Cairo_Pattern. 279 280 procedure Destroy (Pattern : Cairo_Pattern); 281 -- Pattern: a Cairo_Pattern 282 -- 283 -- Decreases the reference count on pattern by one. If the result is 284 -- zero, then pattern and all associated resources are freed. See 285 -- Cairo.Pattern.Reference. 286 287 function Get_Reference_Count (Pattern : Cairo_Pattern) return Guint; 288 -- Pattern: a Cairo_Pattern 289 -- 290 -- Returns the current reference count of pattern. 291 -- 292 -- Return value: the current reference count of pattern. If the 293 -- object is a nil object, 0 will be returned. 294 -- 295 -- Since: 1.4 296 297 function Status (Pattern : Cairo_Pattern) return Cairo_Status; 298 -- Pattern: a Cairo_Pattern 299 -- 300 -- Checks whether an error has previously occurred for this 301 -- pattern. 302 -- 303 -- Return value: Cairo_Status_Success, Cairo_Status_No_Memory, or 304 -- Cairo_Status_Pattern_Type_Mismatch. 305 306 function Get_User_Data 307 (Pattern : Cairo_Pattern; 308 Key : access Cairo_User_Data_Key) return System.Address; 309 -- Pattern: a Cairo_Pattern 310 -- Key: the address of the Cairo_User_Data_Key the user data was 311 -- attached to 312 -- 313 -- Return user data previously attached to pattern using the 314 -- specified key. If no user data has been attached with the given 315 -- key this function returns System.Null_Address. 316 -- 317 -- Return value: the user data previously attached or System.Null_Address. 318 -- 319 -- Since: 1.4 320 321 function Set_User_Data 322 (Pattern : Cairo_Pattern; 323 Key : access Cairo_User_Data_Key; 324 User_Data : System.Address; 325 Destroy : Cairo_Destroy_Func) return Cairo_Status; 326 -- Pattern: a Cairo_Pattern 327 -- Key: the address of a Cairo_User_Data_Key to attach the user data to 328 -- User_Data: the user data to attach to the Cairo_Pattern 329 -- Destroy: a Cairo_Destroy_Func which will be called when the 330 -- Cairo_Context is destroyed or when new user data is attached using the 331 -- same key. 332 -- 333 -- Attach user data to pattern. To remove user data from a surface, 334 -- call this function with the key that was used to set it and Null_Address 335 -- for data. 336 -- 337 -- Return value: Cairo_Status_Success or Cairo_Status_No_Memory if a 338 -- slot could not be allocated for the user data. 339 -- 340 -- Since: 1.4 341 342 function Get_Type (Pattern : Cairo_Pattern) return Cairo_Pattern_Type; 343 -- Pattern: a Cairo_Pattern 344 -- 345 -- This function returns the type a pattern. 346 -- See Cairo_Pattern_Type for available types. 347 -- 348 -- Return value: The type of pattern. 349 -- 350 -- Since: 1.2 351 352 procedure Add_Color_Stop_Rgb 353 (Pattern : Cairo_Pattern; 354 Offset : Gdouble; 355 Red : Gdouble; 356 Green : Gdouble; 357 Blue : Gdouble); 358 -- Pattern: a Cairo_Pattern 359 -- Offset: an Offset in the range [0.0 .. 1.0] 360 -- Red: Red component of color 361 -- Green: Green component of color 362 -- Blue: Blue component of color 363 -- 364 -- Adds an opaque color stop to a gradient pattern. The offset 365 -- specifies the location along the gradient's control vector. For 366 -- example, a linear gradient's control vector is from (X0,Y0) to 367 -- (X1,Y1) while a radial gradient's control vector is from any point 368 -- on the start circle to the corresponding point on the end circle. 369 -- 370 -- The color is specified in the same way as in Cairo.Set_Source_Rgb. 371 -- 372 -- If two (or more) stops are specified with identical offset values, 373 -- they will be sorted according to the order in which the stops are 374 -- added, (stops added earlier will compare less than stops added 375 -- later). This can be useful for reliably making sharp color 376 -- transitions instead of the typical blend. 377 -- 378 -- 379 -- Note: If the pattern is not a gradient pattern, (eg. a linear or 380 -- radial pattern), then the pattern will be put into an error status 381 -- with a status of Cairo_Status_Pattern_Type_Mismatch. 382 383 procedure Add_Color_Stop_Rgba 384 (Pattern : Cairo_Pattern; 385 Offset : Gdouble; 386 Red : Gdouble; 387 Green : Gdouble; 388 Blue : Gdouble; 389 Alpha : Gdouble); 390 -- Pattern: a Cairo_Pattern 391 -- Offset: an Offset in the range [0.0 .. 1.0] 392 -- Red: Red component of color 393 -- Green: Green component of color 394 -- Blue: Blue component of color 395 -- Alpha: Alpha component of color 396 -- 397 -- Adds a translucent color stop to a gradient pattern. The offset 398 -- specifies the location along the gradient's control vector. For 399 -- example, a linear gradient's control vector is from (x0,y0) to 400 -- (x1,y1) while a radial gradient's control vector is from any point 401 -- on the start circle to the corresponding point on the end circle. 402 -- 403 -- The color is specified in the same way as in Cairo_Set_Source_Rgba. 404 -- 405 -- If two (or more) stops are specified with identical offset values, 406 -- they will be sorted according to the order in which the stops are 407 -- added, (stops added earlier will compare less than stops added 408 -- later). This can be useful for reliably making sharp color 409 -- transitions instead of the typical blend. 410 -- 411 -- Note: If the pattern is not a gradient pattern, (eg. a linear or 412 -- radial pattern), then the pattern will be put into an error status 413 -- with a status of Cairo_Status_Pattern_Type_Mismatch. 414 415 procedure Set_Matrix 416 (Pattern : Cairo_Pattern; 417 Matrix : access Cairo_Matrix); 418 -- Pattern: a Cairo_Pattern 419 -- Matrix: a Cairo_Matrix 420 -- 421 -- Sets the pattern's transformation matrix to matrix. This matrix is 422 -- a transformation from user space to pattern space. 423 -- 424 -- When a pattern is first created it always has the identity matrix 425 -- for its transformation matrix, which means that pattern space is 426 -- initially identical to user space. 427 -- 428 -- Important: Please note that the direction of this transformation 429 -- matrix is from user space to pattern space. This means that if you 430 -- imagine the flow from a pattern to user space (and on to device 431 -- space), then coordinates in that flow will be transformed by the 432 -- inverse of the pattern matrix. 433 -- 434 -- For example, if you want to make a pattern appear twice as large as 435 -- it does by default the correct code to use is: 436 -- 437 -- Cairo.Matrix.Init_Scale (Matrix, 0.5, 0.5); 438 -- Cairo.Pattern.Set_Matrix (Pattern, Matrix); 439 -- 440 -- Meanwhile, using values of 2.0 rather than 0.5 in the code above 441 -- would cause the pattern to appear at half of its default size. 442 -- 443 -- Also, please note the discussion of the user-space locking 444 -- semantics of Cairo_Set_Source. 445 446 procedure Get_Matrix 447 (Pattern : Cairo_Pattern; 448 Matrix : access Cairo_Matrix); 449 -- Pattern: a Cairo_Pattern 450 -- Matrix: return value for the Matrix 451 -- 452 -- Stores the pattern's transformation matrix into matrix. 453 454 procedure Set_Extend (Pattern : Cairo_Pattern; Extend : Cairo_Extend); 455 -- Pattern: a Cairo_Pattern 456 -- Extend: a Cairo_Extend describing how the area outside of the 457 -- pattern will be drawn 458 -- 459 -- Sets the mode to be used for drawing outside the area of a pattern. 460 -- See Cairo_Extend for details on the semantics of each extend 461 -- strategy. 462 -- 463 -- The default extend mode is Cairo_Extend_None for surface patterns 464 -- and Cairo_Extend_PAd for gradient patterns. 465 466 function Get_Extend (Pattern : Cairo_Pattern) return Cairo_Extend; 467 -- Pattern: a Cairo_Pattern 468 -- 469 -- Gets the current extend mode for a pattern. See Cairo_Extend 470 -- for details on the semantics of each extend strategy. 471 -- 472 -- Return value: the current extend strategy used for drawing the 473 -- pattern. 474 475 procedure Set_Filter (Pattern : Cairo_Pattern; Filter : Cairo_Filter); 476 -- Pattern: a Cairo_Pattern 477 -- Filter: a Cairo_Filter describing the Filter to use for resizing 478 -- the pattern 479 -- 480 -- Sets the filter to be used for resizing when using this pattern. 481 -- See Cairo_Filter for details on each filter. 482 -- 483 -- Note that you might want to control filtering even when you do not 484 -- have an explicit Cairo_Pattern object, (for example when using 485 -- Cairo_Set_Source_Surface). In these cases, it is convenient to 486 -- use Cairo_Get_Source to get access to the pattern that cairo 487 -- creates implicitly. For example: 488 -- 489 -- Cairo_Set_Source_Surface (Cr, Image, X, Y); 490 -- Cairo.Pattern.Set_Filter (Cairo_Get_Source (Cr), Cairo_Filter_Nearest); 491 492 function Get_Filter (Pattern : Cairo_Pattern) return Cairo_Filter; 493 -- Pattern: a Cairo_Pattern 494 -- 495 -- Gets the current filter for a pattern. See Cairo_Filter 496 -- for details on each filter. 497 -- 498 -- Return value: the current filter used for resizing the pattern. 499 500 function Get_Rgba 501 (Pattern : Cairo_Pattern; 502 Red : access Gdouble; 503 Green : access Gdouble; 504 Blue : access Gdouble; 505 Alpha : access Gdouble) 506 return Cairo_Status; 507 -- Pattern: a Cairo_Pattern 508 -- Red: return value for Red component of color, or null 509 -- Green: return value for Green component of color, or null 510 -- Blue: return value for Blue component of color, or null 511 -- Alpha: return value for Alpha component of color, or null 512 -- 513 -- Gets the solid color for a solid color pattern. 514 -- 515 -- Return value: Cairo_Status_Success, or 516 -- Cairo_Status_Pattern_Type_Mismatch if the pattern is not a solid 517 -- color pattern. 518 -- 519 -- Since: 1.4 520 521 function Get_Surface 522 (Pattern : Cairo_Pattern; 523 Surface : Cairo_Surface) 524 return Cairo_Status; 525 -- Pattern: a Cairo_Pattern 526 -- Surface: return value for Surface of pattern, or null 527 -- 528 -- Gets the surface of a surface pattern. The reference returned in 529 -- surface is owned by the pattern; the caller should call 530 -- Cairo.Surface.Reference if the surface is to be retained. 531 -- 532 -- Return value: Cairo_Status_Success, or 533 -- Cairo_Status_Pattern_Type_Mismatch if the pattern is not a surface 534 -- pattern. 535 -- 536 -- Since: 1.4 537 538 function Get_Color_Stop_Rgba 539 (Pattern : Cairo_Pattern; 540 Index : Gint; 541 Offset : access Gdouble; 542 Red : access Gdouble; 543 Green : access Gdouble; 544 Blue : access Gdouble; 545 Alpha : access Gdouble) 546 return Cairo_Status; 547 -- Pattern: a Cairo_Pattern 548 -- Index: Index of the stop to return data for 549 -- Offset: return value for the Offset of the stop, or null 550 -- Red: return value for Red component of color, or null 551 -- Green: return value for Green component of color, or null 552 -- Blue: return value for Blue component of color, or null 553 -- Alpha: return value for Alpha component of color, or null 554 -- 555 -- Gets the color and offset information at the given index for a 556 -- gradient pattern. Values of index are 0 to 1 less than the number 557 -- returned by Cairo.Pattern.Get_Color_Stop_Count. 558 -- 559 -- Return value: Cairo_Status_Success, or Cairo_Status_Invalid_Index 560 -- if index is not valid for the given pattern. If the pattern is 561 -- not a gradient pattern, Cairo_Status_Pattern_Type_Mismatch is 562 -- returned. 563 -- 564 -- Since: 1.4 565 566 function Get_Color_Stop_Count 567 (Pattern : Cairo_Pattern; 568 Count : access Gint) 569 return Cairo_Status; 570 -- Pattern: a Cairo_Pattern 571 -- Count: return value for the number of color stops, or NULL 572 -- 573 -- Gets the number of color stops specified in the given gradient 574 -- pattern. 575 -- 576 -- Return value: Cairo_Status_Success, or 577 -- Cairo_Status_Pattern_Type_Mismatch if pattern is not a gradient 578 -- pattern. 579 -- 580 -- Since: 1.4 581 582 function Get_Linear_Points 583 (Pattern : Cairo_Pattern; 584 X0 : access Gdouble; 585 Y0 : access Gdouble; 586 X1 : access Gdouble; 587 Y1 : access Gdouble) 588 return Cairo_Status; 589 -- Pattern: a Cairo_Pattern 590 -- X0: return value for the x coordinate of the first point, or null 591 -- Y0: return value for the y coordinate of the first point, or null 592 -- X1: return value for the x coordinate of the second point, or null 593 -- Y1: return value for the y coordinate of the second point, or null 594 -- 595 -- Gets the gradient endpoints for a linear gradient. 596 -- 597 -- Return value: Cairo_Status_Success, or 598 -- Cairo_Status_Pattern_Type_Mismatch if pattern is not a linear 599 -- gradient pattern. 600 -- 601 -- Since: 1.4 602 603 function Get_Radial_Circles 604 (Pattern : Cairo_Pattern; 605 X0 : access Gdouble; 606 Y0 : access Gdouble; 607 R0 : access Gdouble; 608 X1 : access Gdouble; 609 Y1 : access Gdouble; 610 R1 : access Gdouble) 611 return Cairo_Status; 612 -- Pattern: a Cairo_Pattern 613 -- X0: return value for the x coordinate of the center of the first 614 -- circle, or null 615 -- Y0: return value for the y coordinate of the center of the first 616 -- circle, or null 617 -- R0: return value for the radius of the first circle, or null 618 -- X1: return value for the x coordinate of the center of the second 619 -- circle, or null 620 -- Y1: return value for the y coordinate of the center of the second 621 -- circle, or null 622 -- R1: return value for the radius of the second circle, or null 623 -- 624 -- Gets the gradient endpoint circles for a radial gradient, each 625 -- specified as a center coordinate and a radius. 626 -- 627 -- Return value: Cairo_Status_Success, or 628 -- Cairo_Status_Pattern_Type_Mismatch if pattern is not a radial 629 -- gradient pattern. 630 -- 631 -- Since: 1.4 632 633private 634 635 pragma Import (C, Create_Rgb, "cairo_pattern_create_rgb"); 636 pragma Import (C, Create_Rgba, "cairo_pattern_create_rgba"); 637 pragma Import (C, Create_For_Surface, "cairo_pattern_create_for_surface"); 638 pragma Import (C, Create_Linear, "cairo_pattern_create_linear"); 639 pragma Import (C, Create_Radial, "cairo_pattern_create_radial"); 640 pragma Import (C, Reference, "cairo_pattern_reference"); 641 pragma Import (C, Destroy, "cairo_pattern_destroy"); 642 pragma Import 643 (C, 644 Get_Reference_Count, 645 "cairo_pattern_get_reference_count"); 646 pragma Import (C, Status, "cairo_pattern_status"); 647 pragma Import (C, Get_User_Data, "cairo_pattern_get_user_data"); 648 pragma Import (C, Set_User_Data, "cairo_pattern_set_user_data"); 649 pragma Import (C, Get_Type, "cairo_pattern_get_type"); 650 pragma Import (C, Add_Color_Stop_Rgb, "cairo_pattern_add_color_stop_rgb"); 651 pragma Import 652 (C, 653 Add_Color_Stop_Rgba, 654 "cairo_pattern_add_color_stop_rgba"); 655 pragma Import (C, Set_Matrix, "cairo_pattern_set_matrix"); 656 pragma Import (C, Get_Matrix, "cairo_pattern_get_matrix"); 657 pragma Import (C, Set_Extend, "cairo_pattern_set_extend"); 658 pragma Import (C, Get_Extend, "cairo_pattern_get_extend"); 659 pragma Import (C, Set_Filter, "cairo_pattern_set_filter"); 660 pragma Import (C, Get_Filter, "cairo_pattern_get_filter"); 661 pragma Import (C, Get_Rgba, "cairo_pattern_get_rgba"); 662 pragma Import (C, Get_Surface, "cairo_pattern_get_surface"); 663 pragma Import 664 (C, 665 Get_Color_Stop_Rgba, 666 "cairo_pattern_get_color_stop_rgba"); 667 pragma Import 668 (C, 669 Get_Color_Stop_Count, 670 "cairo_pattern_get_color_stop_count"); 671 pragma Import (C, Get_Linear_Points, "cairo_pattern_get_linear_points"); 672 pragma Import (C, Get_Radial_Circles, "cairo_pattern_get_radial_circles"); 673 674end Cairo.Pattern; 675