You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible for vty to provide a function with this type?
composite :: Picture -> (Int, Int) -> Image
This function would convert the layers in the Picture to an Image suitable for composing with other Images or as a layer in another Picture, subject to the width and height expectations provided as a parameter.
I am working on a new terminal UI library similar (in spirit) to vty-ui, and one operation I thought would be cool would be to composite layers as an intermediate step in building interfaces. Specifically I was modifying the Vty Rogue demo application and thought it would be nice to be able to build a minimap by compositing the player and geography images and then compose that with other images in the UI.
What do you think?
The text was updated successfully, but these errors were encountered:
First each layer is transformed from the Image representation to an array of SpanOp s. These arrays of SpanOps are then composed together by the code above.
I see no reason the composition could not be done before. That would likely be simpler than compositing the SpanOps as well.
A verification test for no regressions would be:
forall p < Picture. displayOpsForPic p displayRegion == displayOpsForPic (composite p displayRegion) displayRegion
Would it be possible for
vty
to provide a function with this type?This function would convert the layers in the
Picture
to anImage
suitable for composing with otherImages
or as a layer in anotherPicture
, subject to the width and height expectations provided as a parameter.I am working on a new terminal UI library similar (in spirit) to
vty-ui
, and one operation I thought would be cool would be to composite layers as an intermediate step in building interfaces. Specifically I was modifying the VtyRogue
demo application and thought it would be nice to be able to build a minimap by compositing the player and geography images and then compose that with other images in the UI.What do you think?
The text was updated successfully, but these errors were encountered: