mirror of https://github.com/adamdruppe/arsd.git
Rename image import functions of pixmappaint's arsd.color integration
This commit is contained in:
parent
202bd9fe6a
commit
6c9fa81e68
|
@ -135,26 +135,6 @@ struct Pixmap {
|
||||||
this.width = width;
|
this.width = width;
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
|
||||||
/++
|
|
||||||
Creates a Pixmap wrapping the pixel data from the provided `TrueColorImage`.
|
|
||||||
|
|
||||||
Interoperability function: `arsd.color`
|
|
||||||
+/
|
|
||||||
Pixmap fromTrueColorImage(TrueColorImage source) @nogc {
|
|
||||||
return Pixmap(source.imageData.colors, source.width);
|
|
||||||
}
|
|
||||||
|
|
||||||
/++
|
|
||||||
Creates a Pixmap wrapping the pixel data from the provided `MemoryImage`.
|
|
||||||
|
|
||||||
Interoperability function: `arsd.color`
|
|
||||||
+/
|
|
||||||
Pixmap fromMemoryImage(MemoryImage source) {
|
|
||||||
return fromTrueColorImage(source.getAsTrueColorImage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@safe pure nothrow @nogc:
|
@safe pure nothrow @nogc:
|
||||||
|
|
||||||
/// Height of the buffer, i.e. the number of lines
|
/// Height of the buffer, i.e. the number of lines
|
||||||
|
@ -280,6 +260,24 @@ private struct OriginRectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/++
|
||||||
|
Creates a Pixmap wrapping the pixel data of the provided `TrueColorImage`.
|
||||||
|
|
||||||
|
Interoperability function: `arsd.color`
|
||||||
|
+/
|
||||||
|
Pixmap toPixmap(TrueColorImage source) @nogc {
|
||||||
|
return Pixmap(source.imageData.colors, source.width);
|
||||||
|
}
|
||||||
|
|
||||||
|
/++
|
||||||
|
Creates a Pixmap wrapping the pixel data from the provided `MemoryImage`.
|
||||||
|
|
||||||
|
Interoperability function: `arsd.color`
|
||||||
|
+/
|
||||||
|
Pixmap toPixmap(MemoryImage source) {
|
||||||
|
return source.getAsTrueColorImage().toPixmap();
|
||||||
|
}
|
||||||
|
|
||||||
// ==== Gamut integration ====
|
// ==== Gamut integration ====
|
||||||
|
|
||||||
/++
|
/++
|
||||||
|
|
Loading…
Reference in New Issue