Skip to content

Instantly share code, notes, and snippets.

@Gankra Gankra/clipping.rs
Created Apr 16, 2019

Embed
What would you like to do?
// **** This clip-chain correctly clips the content
ClipChain((
id: (3, (1, 10)),
parent: None,
), [
Clip(4, (1, 10)),// [0]
Clip(2, (1, 10)),// [1]
]),// [16]
// **** If we now introduce a new clip that is parented by it, and stuff it
// **** in a new clip-chain, we get something that fails to clip!
Clip((
id: Clip(5, (1, 10)),
parent_space_and_clip: (
spatial_id: (3, (1, 10)),
clip_id: ClipChain((3, (1, 10))),
),
clip_rect: ((16, -92), (2560, 4032)),
image_mask: None,
), [
]),// [19]
ClipChain((
id: (4, (1, 10)),
parent: None,
), [
Clip(5, (1, 10)),// [0]
]),// [20]
// **** However if we adjust the NEW clip-chain to include an element
// **** from the PARENT clip-chain, it works again??
ClipChain((
id: (4, (1, 10)),
parent: None,
), [
Clip(5, (1, 10)), // [0]
Clip(4, (1, 10)), // <---------- added
]),// [20]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.