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
On Windows specifically, it's not possible to make further draws to a BitmapTarget after calling BitmapTarget::copy_raw_pixels. I believe this is because self.context.end_draw()?; is called during aforementioned method, without a corresponding begin_draw() call. It fails with an error code of BackendError(hresult 88990001).
Example:
use piet::{kurbo::Rect,Color,ImageFormat};use piet_common::{Device,RenderContext};fnmain(){letmut piet = Device::new().unwrap();letmut bitmap = piet.bitmap_target(256,256,1.0).unwrap();{letmut rc = bitmap.render_context();let rect = Rect::new(10.0,10.0,100.0,100.0);
rc.fill(rect,&Color::RED);
rc.finish().unwrap();}letmut data = vec![0; 256 * 256 * 4];
bitmap
.copy_raw_pixels(ImageFormat::RgbaPremul,&mut data).unwrap();{letmut rc = bitmap.render_context();let rect = Rect::new(50.0,50.0,150.0,150.0);
rc.fill(rect,&Color::GREEN);// ERROR!
rc.finish().unwrap();}}
The text was updated successfully, but these errors were encountered:
On Windows specifically, it's not possible to make further draws to a BitmapTarget after calling
BitmapTarget::copy_raw_pixels
. I believe this is becauseself.context.end_draw()?;
is called during aforementioned method, without a correspondingbegin_draw()
call. It fails with an error code ofBackendError(hresult 88990001)
.Example:
The text was updated successfully, but these errors were encountered: