mirror of https://github.com/adamdruppe/arsd.git
Document function `scaleTo`
This commit is contained in:
parent
31308e0777
commit
442c616bae
|
@ -3361,7 +3361,21 @@ private void scaleToImpl(ScalingFilter filter)(const Pixmap source, Pixmap targe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Document this function
|
/++
|
||||||
|
Scales a pixmap and stores the result in the provided target Pixmap.
|
||||||
|
|
||||||
|
The size to scale the image to
|
||||||
|
is derived from the size of the target.
|
||||||
|
|
||||||
|
---
|
||||||
|
// This function can be used to omit a redundant size parameter
|
||||||
|
// in cases like this:
|
||||||
|
target = scale(source, target, target.size, ScalingFilter.bilinear);
|
||||||
|
|
||||||
|
// → Instead do:
|
||||||
|
scaleTo(source, target, ScalingFilter.bilinear);
|
||||||
|
---
|
||||||
|
+/
|
||||||
void scaleTo(const Pixmap source, Pixmap target, ScalingFilter filter) @nogc {
|
void scaleTo(const Pixmap source, Pixmap target, ScalingFilter filter) @nogc {
|
||||||
import std.meta : NoDuplicates;
|
import std.meta : NoDuplicates;
|
||||||
import std.traits : EnumMembers;
|
import std.traits : EnumMembers;
|
||||||
|
|
Loading…
Reference in New Issue