Graphics::SceneObject Class Reference
A Scene containing multiple objects. More...
#include <Scene.h>
Inheritance diagram for Graphics::SceneObject:
Collaboration diagram for Graphics::SceneObject:
Public Types | |
| using | Callback = Delegate< void(SceneObject *scene)> |
Public Types inherited from Graphics::Object | |
| enum | Kind { Kind::XX } |
| using | List = LinkedObjectListTemplate< Object > |
| using | OwnedList = OwnedLinkedObjectListTemplate< Object > |
Public Types inherited from LinkedObjectTemplate< Object > | |
| using | Iterator = IteratorTemplate< Object, Object *, Object & > |
| using | ConstIterator = IteratorTemplate< const Object, const Object *, const Object & > |
Public Member Functions | |
| SceneObject () | |
| SceneObject (Size size, const String &name=nullptr) | |
| SceneObject (RenderTarget &target, const String &name=nullptr) | |
| Kind | kind () const override |
| void | write (MetaWriter &meta) const override |
| Renderer * | createRenderer (const Location &location) const override |
| Create a software renderer for this object. More... | |
| template<typename T > | |
| T * | addObject (T *obj) |
| Add a new object to the scene. More... | |
| template<typename T > | |
| std::enable_if< std::is_base_of< Asset, T >::value, T * >::type | addAsset (T *asset) |
| ObjectAsset * | addAsset (Object *object) |
| Size | getSize () const |
| void | reset (Size size) |
| Reset the scene with a new size. More... | |
| void | clear (const Brush &brush=Color::Black) |
| Clear the scene and fill with a chosen colour. More... | |
| template<typename... ParamTypes> | |
| FilledRectObject * | fillRect (ParamTypes... params) |
| template<typename... ParamTypes> | |
| RectObject * | drawRect (ParamTypes... params) |
| RectObject * | drawRoundRect (int x0, int y0, int w, int h, int radius, Color color) |
| FilledRectObject * | fillRoundRect (int x0, int y0, int w, int h, int radius, Color color) |
| template<typename... ParamTypes> | |
| LineObject * | drawLine (ParamTypes... params) |
| template<typename... ParamTypes> | |
| PolylineObject * | drawTriangle (const Pen &pen, Point pt1, Point pt2, Point pt3) |
| PolylineObject * | drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, Color color) |
| template<typename... ParamTypes> | |
| PolylineObject * | drawPolyline (ParamTypes... params) |
| template<typename... ParamTypes> | |
| CircleObject * | drawCircle (ParamTypes... params) |
| template<typename... ParamTypes> | |
| FilledCircleObject * | fillCircle (ParamTypes... params) |
| template<typename... ParamTypes> | |
| EllipseObject * | drawEllipse (ParamTypes... params) |
| template<typename... ParamTypes> | |
| FilledEllipseObject * | fillEllipse (ParamTypes... params) |
| template<typename... ParamTypes> | |
| ArcObject * | drawArc (ParamTypes... params) |
| template<typename... ParamTypes> | |
| FilledArcObject * | fillArc (ParamTypes... params) |
| template<typename... ParamTypes> | |
| ReferenceObject * | drawImage (ImageObject &image, Point pos, ParamTypes... params) |
| template<typename... ParamTypes> | |
| ReferenceObject * | drawObject (Object &object, ParamTypes... params) |
| SurfaceObject * | copySurface (Surface &surface, const Rect &dest, Point source) |
| CopyObject * | copy (const Rect &source, Point dest) |
| Copy region of display to another. More... | |
| ScrollObject * | scroll (const Rect &area, int16_t cx, int16_t cy, bool wrapx=false, bool wrapy=false, Color fill=Color::None) |
| Scroll display memory. More... | |
| ScrollObject * | scroll (const Rect &area, int16_t cx, int16_t cy, Color fill) |
Public Member Functions inherited from Graphics::Object | |
| bool | operator== (const Object &other) const |
| virtual String | getTypeStr () const |
Public Member Functions inherited from LinkedObjectTemplate< Object > | |
| Object * | getNext () const |
| bool | insertAfter (Object *object) |
| Iterator | begin () const |
| Iterator | end () const |
| Iterator | cbegin () const |
| Iterator | cend () const |
Public Member Functions inherited from LinkedObject | |
| virtual | ~LinkedObject () |
| virtual LinkedObject * | next () const |
| bool | insertAfter (LinkedObject *object) |
| bool | operator== (const LinkedObject &other) const |
| bool | operator!= (const LinkedObject &other) const |
Public Attributes | |
| Size | size |
| CString | name |
| OwnedList | objects |
| AssetList | assets |
Detailed Description
A Scene containing multiple objects.
Member Typedef Documentation
◆ Callback
| using Graphics::SceneObject::Callback = Delegate<void(SceneObject* scene)> |
Constructor & Destructor Documentation
◆ SceneObject() [1/3]
|
inline |
◆ SceneObject() [2/3]
◆ SceneObject() [3/3]
|
inline |
Member Function Documentation
◆ addAsset() [1/2]
|
inline |
◆ addAsset() [2/2]
template<typename T >
|
inline |
◆ addObject()
template<typename T >
|
inline |
Add a new object to the scene.
- Parameters
-
obj This will be owned by the scene
Use this method to add custom objects. To draw an object multiple times use drawObject which will add a reference instead.
◆ clear()
|
inline |
Clear the scene and fill with a chosen colour.
◆ copy()
|
inline |
Copy region of display to another.
- Parameters
-
source Area to copy dest Top-left corner to copy to
◆ copySurface()
|
inline |
◆ createRenderer()
Create a software renderer for this object.
- Parameters
-
location
- Return values
-
renderer Returned renderer object
Return nullptr if object cannot/should not be rendered
Implements Graphics::Object.
◆ drawArc()
template<typename... ParamTypes>
|
inline |
◆ drawCircle()
template<typename... ParamTypes>
|
inline |
◆ drawEllipse()
template<typename... ParamTypes>
|
inline |
◆ drawImage()
template<typename... ParamTypes>
|
inline |
◆ drawLine()
template<typename... ParamTypes>
|
inline |
◆ drawObject()
template<typename... ParamTypes>
|
inline |
◆ drawPolyline()
template<typename... ParamTypes>
|
inline |
◆ drawRect()
template<typename... ParamTypes>
|
inline |
◆ drawRoundRect()
|
inline |
◆ drawTriangle() [1/2]
template<typename... ParamTypes>
|
inline |
◆ drawTriangle() [2/2]
|
inline |
◆ fillArc()
template<typename... ParamTypes>
|
inline |
◆ fillCircle()
template<typename... ParamTypes>
|
inline |
◆ fillEllipse()
template<typename... ParamTypes>
|
inline |
◆ fillRect()
template<typename... ParamTypes>
|
inline |
◆ fillRoundRect()
|
inline |
◆ getSize()
|
inline |
◆ kind()
|
inlineoverridevirtual |
Implements Graphics::Object.
◆ reset()
|
inline |
Reset the scene with a new size.
◆ scroll() [1/2]
|
inline |
Scroll display memory.
- Parameters
-
area Region to scroll cx Distance to scroll horizontally cy Distance to scroll vertically wrapx true to scroll, false to clip in X direction wrapx Y scroll/clip fill Optional color to fill in clip mode
◆ scroll() [2/2]
|
inline |
◆ write()
|
inlineoverridevirtual |
Implements Graphics::Object.
Member Data Documentation
◆ assets
| AssetList Graphics::SceneObject::assets |
◆ name
| CString Graphics::SceneObject::name |
◆ objects
| OwnedList Graphics::SceneObject::objects |
◆ size
| Size Graphics::SceneObject::size |
The documentation for this class was generated from the following file:
Public Types inherited from
1.8.17