Skip to content

Instantly share code, notes, and snippets.

@Gankra
Created April 16, 2019 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gankra/15e669491e87e524a20967e82db9fa81 to your computer and use it in GitHub Desktop.
Save Gankra/15e669491e87e524a20967e82db9fa81 to your computer and use it in GitHub Desktop.
// **** 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