Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clear_bitmap() call fails to clear bitmap correctly and drawing operations to bitmaps fail #108

Open
DarrenGansberg opened this issue Sep 4, 2019 · 1 comment

Comments

@DarrenGansberg
Copy link

Problem Description

Drawing operations to bitmaps are not reflected in changes to bitmaps.

How to reproduce
Create a bitmap by calling create_bitmap(string,int,int), Attempt to draw upon the bitmap or attempt to clear the bitmap to a solid color, by calling clear_bitmap(bitmap, color).

For example:

#include "splashkit.h"

int main()
{
int width = 128;
int height = 256;
bitmap bmp = create_bitmap("mybmp", width, height);

//The colour blue
color c = rgba_color(0.0,0.0,1.0,1.0);

clear_bitmap(bmp, c);

save_bitmap(bmp, "test");
delay(5000);
return 0;
}

Experienced behaviour
Drawing operations are not reflected in bitmaps. For instance, calling clear_bitmap on a bitmap, fails to clear the bitmap to a solid color. Bitmaps when passed to draw_line_on_bitmap fail to result in lines being drawn to a bitmap.

Expected behaviour
Drawing operations are actually reflected in changes to bitmaps. For example, a bitmap passed to clear_bitmap(bitmap, color) would actually be cleared to a solid color. A line drawn upon a bitmap would appear on the bitmap if it is drawn to a window.

@macite
Copy link
Member

macite commented Sep 22, 2019

Looks like you can solve this at the moment by opening a window before creating and drawing the bitmap. I should have a fix done soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants