MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / getCenter

Method getCenter

src/components/ImageComponent.cpp:17–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17Eigen::Vector2f ImageComponent::getCenter() const
18{
19 return Eigen::Vector2f(mPosition.x() - (getSize().x() * mOrigin.x()) + getSize().x() / 2,
20 mPosition.y() - (getSize().y() * mOrigin.y()) + getSize().y() / 2);
21}
22
23ImageComponent::ImageComponent(Window* window, float offsetX, float offsetY, std::string path, float targetWidth, float targetHeight, bool allowUpscale) : GuiComponent(window),
24 mTiled(false), mAllowUpscale(allowUpscale), mFlipX(false), mFlipY(false), mOrigin(0.5, 0.5), mTargetSize(targetWidth, targetHeight), mColorShift(0xFFFFFFFF)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected