mirror of
https://github.com/ilyakooo0/vty.git
synced 2024-11-29 16:54:42 +03:00
addMaybeClipped: skip blit of joins when their primary dimension is zero
This commit is contained in:
parent
0002d3de80
commit
cf3bd4c99f
@ -259,17 +259,19 @@ addMaybeClipped (HorizText a textStr ow _cw) = do
|
||||
in addUnclippedText a textStr'
|
||||
else addUnclippedText a textStr
|
||||
addMaybeClipped (VertJoin topImage bottomImage _ow oh) = do
|
||||
addMaybeClippedJoin "vert_join" skipRows remainingRows rowOffset
|
||||
(imageHeight topImage)
|
||||
topImage
|
||||
bottomImage
|
||||
oh
|
||||
when (imageHeight topImage + imageHeight bottomImage > 0) $
|
||||
addMaybeClippedJoin "vert_join" skipRows remainingRows rowOffset
|
||||
(imageHeight topImage)
|
||||
topImage
|
||||
bottomImage
|
||||
oh
|
||||
addMaybeClipped (HorizJoin leftImage rightImage ow _oh) = do
|
||||
addMaybeClippedJoin "horiz_join" skipColumns remainingColumns columnOffset
|
||||
(imageWidth leftImage)
|
||||
leftImage
|
||||
rightImage
|
||||
ow
|
||||
when (imageWidth leftImage + imageWidth rightImage > 0) $
|
||||
addMaybeClippedJoin "horiz_join" skipColumns remainingColumns columnOffset
|
||||
(imageWidth leftImage)
|
||||
leftImage
|
||||
rightImage
|
||||
ow
|
||||
addMaybeClipped BGFill {outputWidth, outputHeight} = do
|
||||
s <- get
|
||||
let outputWidth' = min (outputWidth - s^.skipColumns) (s^.remainingColumns)
|
||||
|
Loading…
Reference in New Issue
Block a user