mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 23:00:42 +00:00
13 lines
471 B
C++
13 lines
471 B
C++
#include "BMPFormat.h"
|
|
#include "BitmapImage.h"
|
|
|
|
Rect BitmapImage::GetRect() const
|
|
{
|
|
const PortabilityLayer::BitmapInfoHeader *infoHeader = reinterpret_cast<const PortabilityLayer::BitmapInfoHeader*>(reinterpret_cast<const uint8_t*>(this) + sizeof(PortabilityLayer::BitmapFileHeader));
|
|
|
|
const uint32_t width = infoHeader->m_width;
|
|
const uint32_t height = infoHeader->m_height;
|
|
|
|
return Rect::Create(0, 0, static_cast<int16_t>(height), static_cast<int16_t>(width));
|
|
}
|