#pragma once #include #include #include "../Core/Context.h" #include "UIBatch.h" namespace tb { class TBBitmap; class TBRect; } namespace Atomic { class UI; class UIRenderer : public tb::TBRendererBatcher { friend class UI; public: UIRenderer(Context* context); virtual ~UIRenderer(); void BeginPaint(int render_target_w, int render_target_h); void EndPaint(); tb::TBBitmap *CreateBitmap(int width, int height, tb::uint32 *data); void RenderBatch(Batch *batch); void SetClipRect(const tb::TBRect &rect); Context* GetContext() { return context_; } private: WeakPtr context_; PODVector* batches_; PODVector* vertexData_; IntRect currentScissor_; }; }