xilem icon indicating copy to clipboard operation
xilem copied to clipboard

Add Canvas widget - cont.

Open philocalyst opened this issue 2 months ago • 3 comments

philocalyst avatar Oct 31 '25 23:10 philocalyst

To be clear: this is based on https://github.com/linebender/xilem/issues/875.

PoignardAzur avatar Nov 01 '25 22:11 PoignardAzur

Fixed both :)

▰▰▰▰▰ Miles Wirht 🙃

From: Olivier FAURE @.> Sent: 01 November 2025 15:34 To: linebender/xilem @.> Cc: Miles Wirht @.>, Author @.> Subject: Re: [linebender/xilem] Add Canvas widget - cont. (PR #1445)

@PoignardAzur requested changes on this pull request.

Thanks for picking up this work!

On masonry/src/testing/harness.rs:

This is a merge error. You should remove this file.

On masonry/src/widgets/screenshots/masonry__widgets__canvas__tests__hello.png:

You should remove this file.

On masonry/src/widgets/snapshots/masonry__widgets__canvas__tests__simple_canvas.snap:

We almost never do these kinds of snapshot tests anymore. You should remove this file.

  •        );
    
  •        scene.stroke(
    
  •            &Stroke::new(4.),
    
  •            Affine::IDENTITY,
    
  •            Color::from_rgb8(200, 140, 50),
    
  •            None,
    
  •            &path,
    
  •        );
    
  •    });
    
  •    let mut harness = TestHarness::create(
    
  •        DefaultProperties::default(),
    
  •        canvas.with_props(Properties::default()),
    
  •    );
    
  •    assert_debug_snapshot!(harness.root_widget());
    

-- Reply to this email directly or view it on GitHub: https://github.com/linebender/xilem/pull/1445#pullrequestreview-3407809326 You are receiving this because you authored the thread.

Message ID: @.***>

philocalyst avatar Nov 01 '25 23:11 philocalyst

Daniel was the one who requested the changes to Richard's PR, so I'd like to get his opinion as well. ~~But yeah, this is probably good to merge.~~

PoignardAzur avatar Nov 03 '25 10:11 PoignardAzur

How to save a canvas as an image

paulzhang5511 avatar Nov 10 '25 04:11 paulzhang5511

How to save a canvas as an image

This will need to be a follow-up. To avoid locking up the entire app, it would require a lot of care.

DJMcNab avatar Nov 11 '25 10:11 DJMcNab

Welp... I picked these changes up again and I'm confused what was added? There's a new bound for ViewArgument and &mut state is no longer allowed as a parameter...

philocalyst avatar Nov 12 '25 00:11 philocalyst

These changes came from https://github.com/linebender/xilem/pull/1444

Philipp-M avatar Nov 12 '25 10:11 Philipp-M

Thank you! It's not impossible to work around, I was just overwhelmed trying to figure out its source.

▰▰▰▰▰ Miles Wirht 🙃

From: Philipp Mildenberger @.> Sent: 12 November 2025 02:22 To: linebender/xilem @.> Cc: Miles Wirht @.>, Mention @.> Subject: Re: [linebender/xilem] Add Canvas widget - cont. (PR #1445)

Philipp-M left a comment (linebender/xilem#1445)

These changes came from https://github.com/linebender/xilem/pull/1444

-- Reply to this email directly or view it on GitHub: https://github.com/linebender/xilem/pull/1445#issuecomment-3521183749 You are receiving this because you were mentioned.

Message ID: @.***>

philocalyst avatar Nov 12 '25 15:11 philocalyst