OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010, Google Inc. | 2 * Copyright 2010, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 static Pattern* CreateRgbaPattern(Pack* pack, | 62 static Pattern* CreateRgbaPattern(Pack* pack, |
63 double red, | 63 double red, |
64 double green, | 64 double green, |
65 double blue, | 65 double blue, |
66 double alpha); | 66 double alpha); |
67 | 67 |
68 virtual ~Pattern(); | 68 virtual ~Pattern(); |
69 | 69 |
70 cairo_pattern_t* pattern() const { return pattern_; } | 70 cairo_pattern_t* pattern() const { return pattern_; } |
71 | 71 |
| 72 // Set the affine transformation matrix that maps user space to pattern space. |
| 73 // The default matrix is the identity matrix, so that no transformation |
| 74 // occurs. |
| 75 void SetAffineTransform(double xx, |
| 76 double yx, |
| 77 double xy, |
| 78 double yy, |
| 79 double x0, |
| 80 double y0); |
| 81 |
72 private: | 82 private: |
73 Pattern(ServiceLocator* service_locator, cairo_pattern_t* pattern); | 83 Pattern(ServiceLocator* service_locator, cairo_pattern_t* pattern); |
74 | 84 |
75 static Pattern* WrapCairoPattern(Pack* pack, cairo_pattern_t* pattern); | 85 static Pattern* WrapCairoPattern(Pack* pack, cairo_pattern_t* pattern); |
76 | 86 |
77 cairo_pattern_t* pattern_; | 87 cairo_pattern_t* pattern_; |
78 | 88 |
79 O3D_DECL_CLASS(Pattern, ObjectBase) | 89 O3D_DECL_CLASS(Pattern, ObjectBase) |
80 }; // Pattern | 90 }; // Pattern |
81 | 91 |
82 } // namespace o2d | 92 } // namespace o2d |
83 | 93 |
84 } // namespace o3d | 94 } // namespace o3d |
85 | 95 |
86 #endif // O3D_CORE_CROSS_CAIRO_PATTERN_H_ | 96 #endif // O3D_CORE_CROSS_CAIRO_PATTERN_H_ |
OLD | NEW |