| 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 16 matching lines...) Expand all Loading... |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 namespace o3d { | 32 namespace o3d { |
| 33 | 33 |
| 34 namespace o2d { | 34 namespace o2d { |
| 35 | 35 |
| 36 %[ | 36 %[ |
| 37 Layer defines a container for a layer of scene. | 37 A Layer is a rectangular region of the O2D canvas to be filled with a |
| 38 It enables JavaScript to manipulate the layer. | 38 particular Pattern, with automatic clipping based on stacking order. |
| 39 %] | 39 %] |
| 40 [nocpp, include="core/cross/cairo/layer.h"] class Layer : ParamObject { | 40 [nocpp, include="core/cross/cairo/layer.h"] class Layer : ObjectBase { |
| 41 %[ | 41 %[ |
| 42 Translate the object from its current coordinate. | 42 The Pattern used to paint this Layer. |
| 43 | |
| 44 \param x amount to translate in x. | |
| 45 \param y amount to translate in y. | |
| 46 %] | 43 %] |
| 47 void Translate(float x, float y); | 44 [getter, setter] Pattern? pattern; |
| 48 | 45 |
| 49 %[ | 46 %[ |
| 50 Scale the size of the object. | 47 Transparancy of this layer. |
| 51 | |
| 52 \param x amount to scale in the x dimension. | |
| 53 \param y amount to scale in the y dimension. | |
| 54 %] | 48 %] |
| 55 void Scale(float x, float y); | 49 [getter, setter] double alpha; |
| 56 | 50 |
| 57 %[ | 51 %[ |
| 58 Set the transparancy of the object. | 52 The x coordinate of the top-left corner of this layer. |
| 59 | |
| 60 \param alpha amount of the transparancy. | |
| 61 %] | 53 %] |
| 62 void SetAlpha(float alpha); | 54 [getter, setter] double x; |
| 63 | 55 |
| 64 %[ | 56 %[ |
| 65 Set the texture for this object. | 57 The y coordinate of the top-left corner of this layer. |
| 58 %] |
| 59 [getter, setter] double y; |
| 66 | 60 |
| 67 \param texture the texture to assign. | 61 %[ |
| 62 The width of this layer. |
| 68 %] | 63 %] |
| 69 void SetTexture(Texture? texture); | 64 [getter, setter] double width; |
| 65 |
| 66 %[ |
| 67 The height of this layer. |
| 68 %] |
| 69 [getter, setter] double height; |
| 70 |
| 71 %[ |
| 72 A scaling factor to apply to the pattern's x-axis. |
| 73 %] |
| 74 [getter, setter] double scale_x; |
| 75 |
| 76 %[ |
| 77 A scaling factor to apply to the pattern's y-axis. |
| 78 %] |
| 79 [getter, setter] double scale_y; |
| 70 }; // Layer | 80 }; // Layer |
| 71 | 81 |
| 72 } // namespace o2d | 82 } // namespace o2d |
| 73 | 83 |
| 74 } // namespace o3d | 84 } // namespace o3d |
| OLD | NEW |