X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FFrame.cpp;h=4ba8f4a57a6471ef93ef78968537e92a18a09076;hb=HEAD;hp=dbfd814067c95668860d6e34107684a06636e748;hpb=cc3d698b8c1ad09d7a3f9e3f28bc84e0ac1735ea;p=l2e.git diff --git a/src/graphics/Frame.cpp b/src/graphics/Frame.cpp index dbfd814..4ba8f4a 100644 --- a/src/graphics/Frame.cpp +++ b/src/graphics/Frame.cpp @@ -4,7 +4,7 @@ #include "../loader/Interpreter.h" #include "../loader/TypeDescription.h" -using geometry::Vector; +using math::Vector; using loader::FieldDescription; using loader::Interpreter; using loader::TypeDescription; @@ -35,7 +35,7 @@ void Frame::Draw(SDL_Surface *dest, const Vector &position, int width, int // top border Texture(surface, Vector(RepeatWidth(), BorderHeight()), Vector(offset.X() + BorderWidth(), offset.Y())) - .Render(dest, Vector(position.X() + BorderWidth(), position.Y()), Vector(position.X() + width - BorderWidth(), position.Y() + BorderHeight())); + .Draw(dest, Vector(position.X() + BorderWidth(), position.Y()), Vector(position.X() + width - BorderWidth(), position.Y() + BorderHeight())); // top-right corner srcRect.x = offset.X() + RepeatWidth() + BorderWidth(); @@ -45,15 +45,15 @@ void Frame::Draw(SDL_Surface *dest, const Vector &position, int width, int // left border Texture(surface, Vector(BorderWidth(), RepeatHeight()), Vector(offset.X(), offset.Y() + BorderHeight())) - .Render(dest, Vector(position.X(), position.Y() + BorderHeight()), Vector(position.X() + BorderWidth(), position.Y() + height - BorderHeight())); + .Draw(dest, Vector(position.X(), position.Y() + BorderHeight()), Vector(position.X() + BorderWidth(), position.Y() + height - BorderHeight())); // center fill Texture(surface, RepeatSize(), Vector(offset.X() + BorderWidth(), offset.Y() + BorderHeight())) - .Render(dest, position + BorderSize(), position + Vector(width, height) - BorderSize()); + .Draw(dest, position + BorderSize(), position + Vector(width, height) - BorderSize()); // right border Texture(surface, Vector(BorderWidth(), RepeatHeight()), Vector(offset.X() + BorderWidth() + RepeatWidth(), offset.Y() + BorderHeight())) - .Render(dest, Vector(position.X() + width - BorderWidth(), position.Y() + BorderHeight()), Vector(position.X() + width, position.Y() + height - BorderHeight())); + .Draw(dest, Vector(position.X() + width - BorderWidth(), position.Y() + BorderHeight()), Vector(position.X() + width, position.Y() + height - BorderHeight())); // bottom-left corner srcRect.x = offset.X(); @@ -66,7 +66,7 @@ void Frame::Draw(SDL_Surface *dest, const Vector &position, int width, int // bottom border Texture(surface, Vector(RepeatWidth(), BorderHeight()), Vector(offset.X() + BorderWidth(), offset.Y() + BorderHeight() + RepeatHeight())) - .Render(dest, Vector(position.X() + BorderWidth(), position.Y() + height - BorderHeight()), Vector(position.X() + width - BorderWidth(), position.Y() + height)); + .Draw(dest, Vector(position.X() + BorderWidth(), position.Y() + height - BorderHeight()), Vector(position.X() + width - BorderWidth(), position.Y() + height)); // bottom-right corner srcRect.x = offset.X() + BorderWidth() + RepeatWidth();