| 15 | } |
| 16 | |
| 17 | Eigen::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 | |
| 23 | ImageComponent::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) |
no outgoing calls
no test coverage detected