/src/wrappers/cairo/library/cairo_radial_pattern.e

http://github.com/tybor/Liberty · Specman e · 59 lines · 26 code · 10 blank · 23 comment · 2 complexity · 525a92c0ad00b3c80810cc5254e8e0b0 MD5 · raw file

  1. note
  2. description: "."
  3. copyright: "[
  4. Copyright (C) 2007-2017: Paolo Redaelli, Cairo team
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. class CAIRO_RADIAL_PATTERN
  19. inherit CAIRO_GRADIENT_PATTERN
  20. create {ANY} make, from_external_pointer
  21. feature {} -- Creation
  22. make (cx0,cy0,radius0,cx1,cy1,radius1: REAL)
  23. -- Creates a new radial gradient cairo_pattern_t between
  24. -- the two circles defined by (x0, y0, c0) and (x1, y1,
  25. -- c0). Before using the gradient pattern, a number of
  26. -- color stops should be defined using `add_color_stop_rgb'
  27. -- or `add_color_stop_rgba'.
  28. -- Note: The coordinates here are in pattern space. For a new
  29. -- pattern, pattern space is identical to user space, but the
  30. -- relationship between the spaces can be changed with
  31. -- `set_matrix'.
  32. -- cx0 : x coordinate for the center of the start circle
  33. -- cy0 : y coordinate for the center of the start circle
  34. -- radius0 : radius of the start cirle
  35. -- cx1 : x coordinate for the center of the end circle
  36. -- cy1 : y coordinate for the center of the end circle
  37. -- radius1 : radius of the end cirle
  38. do
  39. from_external_pointer(cairo_pattern_create_radial(cx0,cy0,radius0,cx1,cy1,radius1))
  40. -- cairo_pattern_create_radial returns the newly created
  41. -- cairo_pattern_t if succesful, or an error pattern in case
  42. -- of no memory. The caller owns the returned object and
  43. -- should call cairo_pattern_destroy() when finished with
  44. -- it. This function will always return a valid pointer, but
  45. -- if an error occurred the pattern status will be set to an
  46. -- error. To inspect the status of a pattern use
  47. -- cairo_pattern_status().
  48. end
  49. end -- class CAIRO_RADIAL_PATTERN