mirror of https://github.com/adamdruppe/arsd.git
move basic drawing interface to the shared interface file color.d
This commit is contained in:
parent
71e20933af
commit
5a25404ede
15
color.d
15
color.d
|
|
@ -1335,6 +1335,21 @@ interface MemoryImage {
|
||||||
alias fromImageFile = fromImage;
|
alias fromImageFile = fromImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/++
|
||||||
|
|
||||||
|
This interface is likely going to grow, so if you implement it, expect to have to add more methods as you update the library.
|
||||||
|
|
||||||
|
History:
|
||||||
|
Added to arsd.game August 26, 2024, moved to arsd.color April 20, 2025
|
||||||
|
+/
|
||||||
|
@system
|
||||||
|
interface BasicDrawing {
|
||||||
|
void fillRectangle(Rectangle r, Color c);
|
||||||
|
void outlinePolygon(Point[] vertexes, Color c);
|
||||||
|
void drawText(Rectangle boundingBox, string text, Color c);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// An image that consists of indexes into a color palette. Use [getAsTrueColorImage]() if you don't care about palettes
|
/// An image that consists of indexes into a color palette. Use [getAsTrueColorImage]() if you don't care about palettes
|
||||||
class IndexedImage : MemoryImage {
|
class IndexedImage : MemoryImage {
|
||||||
bool hasAlpha;
|
bool hasAlpha;
|
||||||
|
|
|
||||||
10
game.d
10
game.d
|
|
@ -1542,16 +1542,6 @@ void clearOpenGlScreen(SimpleWindow window) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/++
|
|
||||||
History:
|
|
||||||
Added August 26, 2024
|
|
||||||
+/
|
|
||||||
interface BasicDrawing {
|
|
||||||
void fillRectangle(Rectangle r, Color c);
|
|
||||||
void outlinePolygon(Point[] vertexes, Color c);
|
|
||||||
void drawText(Rectangle boundingBox, string text, Color c);
|
|
||||||
}
|
|
||||||
|
|
||||||
/++
|
/++
|
||||||
NOT fully compatible with simpledisplay's screenpainter, but emulates some of its api.
|
NOT fully compatible with simpledisplay's screenpainter, but emulates some of its api.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue