You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sprite's takeScreenshot() function returns an entirely black TrueColorImage. It should just return an image containing what was on the sprite.
This works correctly on Linux, but not on Windows
example code:
import arsd.simpledisplay, arsd.png;
voidmain() {
auto win = new SimpleWindow(500, 500, "Test");
auto img = Image.fromMemoryImage(readPng("./smiley.png")); // replace "./smiley.png" with a path to an image on your computerauto sprite = new Sprite(win, img);
auto sprite2 = Sprite.fromMemoryImage(win, sprite.takeScreenshot(), true); // *should* just copy the data in the other spritescope(exit) {
sprite.dispose();
sprite2.dispose();
}
win.eventLoop(10, delegate() {
auto sp = win.draw;
// this should be two copies of the same image, but on Windows it doesn't work
sprite.drawAt(sp, Point(0, 0));
sprite2.drawAt(sp, Point(100, 0));
});
}
The text was updated successfully, but these errors were encountered:
I might have only implemented it on windows themselves, will need to check if it does win32 bitmap copy too (which is an easy operation but ... maybe i missed a spot)
Sprite
'stakeScreenshot()
function returns an entirely blackTrueColorImage
. It should just return an image containing what was on the sprite.This works correctly on Linux, but not on Windows
example code:
The text was updated successfully, but these errors were encountered: