mirror of
https://github.com/trudnai/Steve2.git
synced 2024-06-13 09:29:36 +00:00
BugFix: Screen refresh area
This commit is contained in:
parent
7101b1b1ea
commit
f9ce8c3399
|
@ -187,6 +187,8 @@ class HiRes: NSView {
|
|||
// default is green
|
||||
var monoColor : UInt32 = 0xFF2BD84A
|
||||
|
||||
static let refreshUnderscan: CGFloat = 1;
|
||||
static let refreshOverscan : CGFloat = refreshUnderscan * 2;
|
||||
|
||||
func refreshChanged( blockSize : Int ) {
|
||||
// refresh changed block only
|
||||
|
@ -205,7 +207,12 @@ class HiRes: NSView {
|
|||
let w = blockScreenWidth + CGFloat(screenBlockMargin) * CGFloat(blockSize)
|
||||
let h = blockScreenHeigth + CGFloat(screenBlockMargin) * CGFloat(blockSize)
|
||||
|
||||
let boundingBox = CGRect(x: x, y: y, width: w, height: h)
|
||||
let boundingBox = CGRect(
|
||||
x: x - HiRes.refreshUnderscan,
|
||||
y: y - HiRes.refreshUnderscan,
|
||||
width: w + HiRes.refreshOverscan,
|
||||
height: h + HiRes.refreshOverscan
|
||||
)
|
||||
self.setNeedsDisplay( boundingBox )
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user