Advertisement
Guest User

Untitled

a guest
May 5th, 2015
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.94 KB | None | 0 0
  1. SPGradient *SPGradient::getVector(bool force_vector)
  2. {
  3.     SPGradient * src = chase_hrefs(this, has_stopsFN);
  4.  
  5.     if (force_vector) {
  6.         src = sp_gradient_ensure_vector_normalized(src);
  7.     }
  8.     return src;
  9. }
  10.  
  11. /**
  12.  * Returns the effective spread of given gradient (climbing up the refs chain if needed).
  13.  *
  14.  * \pre SP_IS_GRADIENT(gradient).
  15.  */
  16. SPGradientSpread SPGradient::fetchSpread()
  17. {
  18.     SPGradient const *src = chase_hrefs(this, has_spread_set);
  19.     return ( src
  20.              ? src->spread
  21.              : SP_GRADIENT_SPREAD_PAD ); // pad is the default
  22. }
  23.  
  24. /**
  25.  * Returns the effective units of given gradient (climbing up the refs chain if needed).
  26.  *
  27.  * \pre SP_IS_GRADIENT(gradient).
  28.  */
  29. SPGradientUnits SPGradient::fetchUnits()
  30. {
  31.     SPGradient const *src = chase_hrefs(this, has_units_set);
  32.     return ( src
  33.              ? src->units
  34.              : SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX ); // bbox is the default
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement