def RefreshVisibleElements(self, xp=None, yp=None):
x, y = self.Editor.CalcUnscrolledPosition(0, 0)
if xp is not None:
x = xp * self.Editor.GetScrollPixelsPerUnit()[0]
if yp is not None:
y = yp * self.Editor.GetScrollPixelsPerUnit()[1]
width, height = self.Editor.GetClientSize()
screen = wx.Rect(int(x / self.ViewScale[0]), int(y / self.ViewScale[1]),
int(width / self.ViewScale[0]), int(height / self.ViewScale[1]))
for comment in self.Comments.itervalues():
comment.TestVisible(screen)
for wire in self.Wires.iterkeys():
wire.TestVisible(screen)
for block in self.Blocks.itervalues():
block.TestVisible(screen)
评论列表
文章目录