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

Celiagg and Image backend have different inital state #1047

Open
corranwebster opened this issue May 5, 2023 · 2 comments
Open

Celiagg and Image backend have different inital state #1047

corranwebster opened this issue May 5, 2023 · 2 comments

Comments

@corranwebster
Copy link
Contributor

corranwebster commented May 5, 2023

It looks like the Celiagg backend starts out with a completely transparent image, but the Image/agg backend starts out filled with white. It looks like Quartz and Cairo also start out transparent, QPainter doesn't initialize to anything, so Agg is probably the odd-one out.

Celiagg initializes with zeros:

buffer = np.zeros(shape, dtype=np.uint8)

Agg initializes with 255:

pixel_map = PixelMap(
width,
height,
pix_format_string_map[pix_format],
255,
bool(bottom_up),
).set_bmp_array()

@corranwebster
Copy link
Contributor Author

This is causing test failures for the Chaco test suite when run with non-agg backends: enthought/chaco#891

@corranwebster
Copy link
Contributor Author

Work-around is to explicitly call gc.clear() before drawing anything in tests.

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

1 participant