From eade7a375475dbaeeab1260f2832a1d3d0d164df Mon Sep 17 00:00:00 2001 From: Elias Batek Date: Sun, 6 Oct 2024 03:55:04 +0200 Subject: [PATCH] Fix and improve documentation of PixmapPaint --- pixmappaint.d | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pixmappaint.d b/pixmappaint.d index b52bcf8..66d6790 100644 --- a/pixmappaint.d +++ b/pixmappaint.d @@ -402,7 +402,7 @@ struct SubPixmap { return size.height; } - /// height + /// ditto void height(int value) { size.height = value; } @@ -477,6 +477,15 @@ struct SubPixmap { Both defects could indicate an invalid subimage. Use this function to verify the SubPixmap. ) + + $(WARNING + Do not use invalid SubPixmaps. + The library assumes that the SubPixmaps it receives are always valid. + + Non-valid SubPixmaps are not meant to be used for creative effects + or similar either. Such uses might lead to unexpected quirks or + crashes eventually. + ) +/ bool isValid() const { return ( @@ -860,7 +869,7 @@ struct SubPixmapScanner { Wrapper for scanning a [Pixmap] line by line. See_also: - Unlike [SubPixmapScanner], this does not work with `const(Pixmap)`. + Unlike [SubPixmapScanner], this does not work with `const(SubPixmap)`. +/ struct SubPixmapScannerRW { private {