commit x64 compilation from lulu cause the other branch dont seems to compile properly at home
This commit is contained in:
29
include/engine/ui/widget_canvas.cpp
Normal file
29
include/engine/ui/widget_canvas.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#include "ui/widget_canvas.h"
|
||||
|
||||
using namespace GS::S2D;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool CanvasWidget::Allocate(uint width, uint height)
|
||||
{
|
||||
if (!picture->AllocAs(width, height, GS::PixelFormat::RGBA8))
|
||||
return false;
|
||||
|
||||
dirty = true;
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
CanvasWidget::CanvasWidget(int id, uint width, uint height) : DrawableWidget(id)
|
||||
{
|
||||
type = WidgetTypeCanvas;
|
||||
picture = new GS::Picture(width, height);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user