MCPcopy Index your code
hub / github.com/endbasic/endbasic / move_pixels

Method move_pixels

std/src/gfx/lcd/buffered/mod.rs:433–450  ·  view source on GitHub ↗
(
        &mut self,
        x1y1: PixelsXY,
        x2y2: PixelsXY,
        size: SizeInPixels,
    )

Source from the content-addressed store, hash-verified

431 }
432
433 fn move_pixels(
434 &mut self,
435 x1y1: PixelsXY,
436 x2y2: PixelsXY,
437 size: SizeInPixels,
438 ) -> io::Result<()> {
439 self.assert_xy_size_in_range(x1y1, size);
440 self.assert_xy_size_in_range(x2y2, size);
441
442 let data = self.read_pixels(x1y1, size)?;
443
444 self.without_sync(|self2| {
445 self2.draw_rect_filled(x1y1, size)?;
446 self2.put_pixels(x2y2, &data)
447 })?;
448
449 Ok(())
450 }
451
452 fn write_text(&mut self, xy: PixelsXY, text: &str) -> io::Result<()> {
453 self.without_sync(|self2| drawing::draw_text(self2, self2.font, xy, text))

Callers

nothing calls this directly

Calls 5

without_syncMethod · 0.80
read_pixelsMethod · 0.45
draw_rect_filledMethod · 0.45
put_pixelsMethod · 0.45

Tested by

no test coverage detected