!SfJCDXZbMHXkPovtKL:matrix.org

Rust Embedded Graphics

326 Members
Help and chat for embedded-graphics and the wider embedded Rust graphics ecosystem | https://github.com/embedded-graphics/embedded-graphics | https://crates.io/crates/embedded-graphics28 Servers

Load older messages


SenderMessageTime
5 Dec 2024
@9names:matrix.org9namesAh looks like rawpixels has been decommissioned, sad23:09:35
@9names:matrix.org9namesIt was a good tool23:10:01
@jamwaffles:matrix.orgjamwafflesI just thought it didn’t work with Adblock lol23:11:45
6 Dec 2024
@9names:matrix.org9namesi added some basic 565 support to pixpeep. https://github.com/9names/pixpeep/tree/rgb56505:54:17
@9names:matrix.org9names in doing that, i realised maybe you want the pix_fmt to be rgb565be depending on your screen 05:57:55
@9names:matrix.org9namespixpeep_demo.png
Download pixpeep_demo.png
05:58:35
@9names:matrix.org9namesffmpeg's dithering does seem to introduce some interesting artifacts to the pure colour blocks05:58:57
@dngrs:matrix.orgdngrsBasic pixel operations are sometimes upsettingly full of corner cases it seems. Affinity photo (or was it Photoshop?) struggles with integer scaling using nearest neighbor under certain circumstances, forgot the details but sheeesh06:07:12
@scorpion2185:matrix.orgscorpion2185
            TextStyleBuilder::new()
                .alignment(embedded_graphics::text::Alignment::Right)
                .baseline(embedded_graphics::text::Baseline::Alphabetic)
                .build(),
        );
        
        let display_area = display.bounding_box();
        LinearLayout::horizontal(Chain::new(perc))
            .with_spacing(spacing::FixedMargin(10))
            .with_alignment(vertical::Center)
            .arrange()
            .align_to(&display_area, horizontal::Right, vertical::Top)
            .draw(display,Font::new()?;
           
        Ok(())

how can I control font size ?

20:36:18
@jamwaffles:matrix.orgjamwafflesYou need to pick a different font. e-g doesn't support dynamic scaling unfortunately20:37:09
@jamwaffles:matrix.orgjamwaffles There are some builtins to choose from here but there are a few third party crates too 20:38:00
@scorpion2185:matrix.orgscorpion2185how do i pick a font ?20:38:39
@scorpion2185:matrix.orgscorpion2185 i used .draw(display)?; 20:39:03
@scorpion2185:matrix.orgscorpion2185 *
            TextStyleBuilder::new()
                .alignment(embedded_graphics::text::Alignment::Right)
                .baseline(embedded_graphics::text::Baseline::Alphabetic)
                .build(),
        );
        
        let display_area = display.bounding_box();
        LinearLayout::horizontal(Chain::new(perc))
            .with_spacing(spacing::FixedMargin(10))
            .with_alignment(vertical::Center)
            .arrange()
            .align_to(&display_area, horizontal::Right, vertical::Top)
            .draw(display)?;
           
        Ok(())

how can I control font size ?

20:39:13
@jamwaffles:matrix.orgjamwafflesHave a look at the examples: https://github.com/embedded-graphics/examples/blob/main/eg-0.8/examples/text-fonts.rs 20:39:28
7 Dec 2024
@scorpion2185:matrix.orgscorpion2185
    pub fn draw<D: DrawTarget<Color = Rgb>>(&self, display: &mut D) -> Result<(), D::Error> {
        display.clear(Rgb::BLACK)?;

        let mut buf: heapless::String<16> = heapless::String::new();
        write!(buf, "{:02}:{:02}", self.time.hour(), self.time.minute()).unwrap();
        let hm = Text::with_text_style(
            &buf,
            display.bounding_box().center(),
            watch_text_style(Rgb::CSS_LIME),
            TextStyleBuilder::new()
                .alignment(embedded_graphics::text::Alignment::Center)
                .baseline(embedded_graphics::text::Baseline::Alphabetic)
                .build(),
        );

how can I use a framebuffer to ipdate the text only?

15:02:27
11 Dec 2024
@avsaase:matrix.orgAlexander van Saase I'd love to know if there is a better solution but what I do is clear the part of the frame buffer where the text is rendered and then re-render it. 21:02:09
14 Dec 2024
@starfighter:tchncs.deStarfighter joined the room.16:59:50
17 Dec 2024
@jsizeland:matrix.orgJames SizelandAnyone using Lottie to create animations for embedded rust targets?21:14:21
19 Dec 2024
@birdistheword99:matrix.orgbirdistheword99 joined the room.10:25:44
30 Dec 2024
@sunlik:matrix.orglikai joined the room.09:54:46
31 Dec 2024
@isinfinity:matrix.orgisinfinity joined the room.03:46:51
2 Jan 2025
@calisti:tchncs.decalisti joined the room.16:19:34
5 Jan 2025
@strawman:matrix.orgstrawman set a profile picture.15:26:52
@strawman:matrix.orgstrawman changed their profile picture.15:27:17
@strawman:matrix.orgstrawman removed their profile picture.15:27:21
@strawman:matrix.orgstrawman set a profile picture.15:27:38
@strawman:matrix.orgstrawman removed their profile picture.15:27:43
@davoclavo:matrix.orgdavoclavo joined the room.22:46:58
6 Jan 2025
@g5pw:matrix.orgg5pw joined the room.16:09:54

Show newer messages


Back to Room ListRoom Version: 5