Пример #1
0
void PlayerViewport::SetScale(Vector2f newScale)
{
    //Instead of scaling this item, scale up the texture itself.
    Vector2f targetSize = newScale.ComponentProduct(ToV2f(Vector2u(worldRendColor.GetWidth(),
                                                                   worldRendColor.GetHeight())));
    Vector2u sizeU = ToV2u(targetSize.Ceil());
    worldRendColor.ClearData(sizeU.x, sizeU.y);
    worldRendTarg.UpdateSize();

    DidBoundsChange = true;
}