Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Picture = Picture {
- picCursor :: Cursor
- picLayers :: [Image]
- picBackground :: Background
- emptyPicture :: Picture
- addToTop :: Picture -> Image -> Picture
- addToBottom :: Picture -> Image -> Picture
- picForImage :: Image -> Picture
- picForLayers :: [Image] -> Picture
- data Cursor
- data Background
- = Background { }
- | ClearBackground
- picImage :: Picture -> Image
- module Graphics.Vty.Image
Documentation
The type of images to be displayed using update
.
Can be constructed directly or using picForImage
. Which provides an initial instance with
reasonable defaults for picCursor and picBackground.
Picture | |
|
emptyPicture :: Picture Source
a picture with no cursor, background or image layers
addToBottom :: Picture -> Image -> Picture Source
picForImage :: Image -> Picture Source
Create a picture for display for the given image. The picture will not have a displayed cursor and no background pattern (ClearBackground) will be used.
picForLayers :: [Image] -> Picture Source
Create a picture for display with the given layers. Ordered top to bottom.
The picture will not have a displayed cursor and no background apttern (ClearBackgroun) will be used.
The first Image
is the top layer.
A picture can be configured either to not show the cursor or show the cursor at the specified character position.
There is not a 1 to 1 map from character positions to a row and column on the screen due to characters that take more than 1 column.
todo: The Cursor can be given a (character,row) offset outside of the visible bounds of the output region. In this case the cursor will not be shown.
data Background Source
A Picture
has a background pattern. The background is either ClearBackground. Which shows the
layer below or is blank if the bottom layer. Or the background pattern is a character and a
display attribute. If the display attribute used previously should be used for a background fill
then use currentAttr
for the background attribute.
todo The current attribute is always set to the default attributes at the start of updating the screen to a picture.
Background | |
| |
ClearBackground | A ClearBackground is:
|
picImage :: Picture -> Image Source
Compatibility with applications that do not use more than a single layer.
module Graphics.Vty.Image