13Rectangle::Rectangle(Sml::Color fillColor) : 
Shape(fillColor) {}
 
   14Rectangle::Rectangle(
const Background* background) : 
Shape(background) {}
 
   16int32_t Rectangle::getWidth()
 const { 
return m_Width; }
 
   17void Rectangle::setWidth(int32_t width) { m_Width = width; }
 
   19int32_t Rectangle::getHeight()
 const { 
return m_Height; }
 
   20void Rectangle::setHeight(int32_t height) { m_Height = height; }
 
   22void Rectangle::render(
const Sml::Rectangle<int32_t>& targetRegion)
 
   24    renderShadow(targetRegion);
 
   26    Sml::Rectangle<int32_t> region = getLayoutBounds();
 
   27    region.pos += targetRegion.pos;
 
   29    Sml::Renderer::getInstance().setColor(m_FillColor);
 
   30    Sml::renderFilledRect(region);
 
   32    if (getBackground() != 
nullptr)
 
   34        Sgl::Background::fillArea(getBackground(), region);
 
   37    if (getBorder() != 
nullptr)
 
   39        Border::encloseArea(getBorder(), targetRegion);
 
   43int32_t Rectangle::computePrefWidth(int32_t height)
 const 
   48int32_t Rectangle::computePrefHeight(int32_t width)
 const