Go to the documentation of this file. 1 #ifndef OUTPUTSURFACE_HH
2 #define OUTPUTSURFACE_HH
60 return sizeof(
Pixel) == 2
71 assert(
sizeof(
Pixel) != 4);
83 if (
sizeof(
Pixel) == 2) {
84 return (p != getKeyColor<Pixel>())
86 : getKeyColorClash<Pixel>();
88 assert(p != getKeyColor<Pixel>());
99 return mapKeyedRGB255<Pixel>(
gl::ivec3(rgb * 255.0f));
OutputSurface & operator=(const OutputSurface &)=delete
void format(SectorAccessibleDisk &disk, bool dos1)
Format the given disk (= a single partition).
uint32_t mapRGB(gl::vec3 rgb) const
Returns the pixel value for the given RGB color.
virtual void saveScreenshot(const std::string &filename)=0
Save the content of this OutputSurface to a PNG file.
void calculateViewPort(gl::ivec2 logSize, gl::ivec2 physSize)
void setPixelFormat(const PixelFormat &format)
bool isViewScaled() const
gl::vec2 getViewScale() const
int getLogicalHeight() const
gl::ivec2 getViewOffset() const
void setOpenGlPixelFormat()
const PixelFormat & getPixelFormat() const
uint32_t mapRGB255(gl::ivec3 rgb) const
Same as mapRGB, but RGB components are in range [0..255].
Pixel mapKeyedRGB255(gl::ivec3 rgb)
Returns the pixel value for the given RGB color.
int getLogicalWidth() const
constexpr const char *const filename
virtual ~OutputSurface()=default
gl::ivec2 getPhysicalSize() const
Pixel getKeyColorClash() const
Returns a color that is visually very close to the key color.
A frame buffer where pixels can be written to.
OutputSurface(const OutputSurface &)=delete
Pixel getKeyColor() const
Returns the color key for this output surface.
Pixel mapKeyedRGB(gl::vec3 rgb)
Returns the pixel value for the given RGB color.
This file implemented 3 utility functions:
gl::ivec2 getLogicalSize() const
gl::ivec2 getViewSize() const