/src/wrappers/cairo/library/cairo_linear_pattern.e

http://github.com/tybor/Liberty · Specman e · 57 lines · 26 code · 11 blank · 20 comment · 2 complexity · 7005ea49a18bd442fcfb44643c8c703f 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_LINEAR_PATTERN
  19. inherit CAIRO_GRADIENT_PATTERN
  20. create {ANY} make, from_external_pointer
  21. feature {} -- Creation
  22. make (x0,y0,x1,y1: REAL)
  23. -- Create a new linear gradient along the line defined by
  24. -- (x0, y0) and (x1, y1). Before using the gradient pattern,
  25. -- a number of color stops should be defined using
  26. -- `add_color_stop_rgb' or `add_color_stop_rgba'.
  27. -- Note: The coordinates here are in pattern space. For a new
  28. -- pattern, pattern space is identical to user space, but the
  29. -- relationship between the spaces can be changed with
  30. -- `set_matrix'.
  31. -- x0 : x coordinate of the start point
  32. -- y0 : y coordinate of the start point
  33. -- x1 : x coordinate of the end point
  34. -- y1 : y coordinate of the end point
  35. do
  36. from_external_pointer(cairo_pattern_create_linear(x0,y0,x1,y1))
  37. -- cairo_pattern_create_linear returns the newly created
  38. -- cairo_pattern_t if succesful, or an error pattern in case
  39. -- of no memory. The caller owns the returned object and
  40. -- should call cairo_pattern_destroy() when finished with
  41. -- it. This function will always return a valid pointer, but
  42. -- if an error occurred the pattern status will be set to an
  43. -- error. To inspect the status of a pattern use
  44. -- cairo_pattern_status().
  45. end
  46. end -- class CAIRO_LINEAR_PATTERN