From 38301f1507b22d5f5ee6b9b99e0a64f73ebf1e57 Mon Sep 17 00:00:00 2001 From: Elias Batek Date: Sun, 6 Oct 2024 00:19:32 +0200 Subject: [PATCH] Document SubPixmap.xferTo() and improve docs slightly. --- pixmappaint.d | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pixmappaint.d b/pixmappaint.d index 6900bd8..83b5c0e 100644 --- a/pixmappaint.d +++ b/pixmappaint.d @@ -416,7 +416,17 @@ struct SubPixmap { } } + /++ + Blends the pixels of this subimage into a target image. + + The target MUST have the same size. + + See_also: + Usually you’ll want to use [drawPixmap] instead. + +/ public void xferTo(SubPixmap target, Blend blend = blendNormal) const { + debug assert(target.size == this.size); + auto src = SubPixmapScanner(this); auto dst = SubPixmapScannerRW(target); @@ -630,6 +640,8 @@ struct SubPixmap { } /++ + $(I Advanced functionality.) + Wrapper for scanning a [Pixmap] line by line. +/ struct PixmapScanner { @@ -663,6 +675,8 @@ struct PixmapScanner { } /++ + $(I Advanced functionality.) + Wrapper for scanning a [Pixmap] line by line. +/ struct SubPixmapScanner { @@ -703,6 +717,8 @@ struct SubPixmapScanner { } /++ + $(I Advanced functionality.) + Wrapper for scanning a [Pixmap] line by line. See_also: