namespace simgear
{
+namespace HTTP { class Request; }
namespace canvas
{
public Element
{
public:
+ static const std::string TYPE_NAME;
+ static void staticInit();
+
/**
* @param node Property node containing settings for this image:
* rect/[left/right/top/bottom] Dimensions of source
*/
Image( const CanvasWeakPtr& canvas,
const SGPropertyNode_ptr& node,
- const Style& parent_style,
+ const Style& parent_style = Style(),
Element* parent = 0 );
virtual ~Image();
enum ImageAttributes
{
SRC_RECT = LAST_ATTRIBUTE << 1, // Source image rectangle
- DEST_SIZE = SRC_RECT << 1 // Element size
+ DEST_SIZE = SRC_RECT << 1, // Element size
+ SRC_CANVAS = DEST_SIZE << 1
};
virtual void childChanged(SGPropertyNode * child);
void setQuad(size_t index, const SGVec2f& tl, const SGVec2f& br);
void setQuadUV(size_t index, const SGVec2f& tl, const SGVec2f& br);
+ void handleImageLoadDone(HTTP::Request*);
+
osg::ref_ptr<osg::Texture2D> _texture;
// TODO optionally forward events to canvas
CanvasWeakPtr _src_canvas;