I’m not quite happy with how the Edit View remains white, and want to make a reporter plugin that alters the appearance. I have three questions:
What is the best way to fill the edit view with a different colour? I was thinking of drawing a massive rectangle in the back, but it feels clumsy.
Related to the above, I am using the SDK template, in which preview() method exists. Its layer only covers the bounds of each bezier path and I cannot fill the whole preview area with my knowledge. How can I get the NSRect of the area?
How can I cancel the default drawing of inactive layers and previews so that I can fill the letterforms with white? Currently I can only draw stuff behind of on top what’s already drawn, and feels wasteful.
Thanks, I was guessing that might be the case. I could get reasonably close to that though.
But could you answer my questions anyway so that I can learn?
The problem with .graphicView().bounds() is that I cannot use it straight away. I can change size using scale of course, but the origin point is based on the location of the currently selected glyph. For example, this doesn’t really fill the view in the way I want:
NSBezierPath.fillRect_(Glyphs.font.currentTab.viewPort)
In some of the reporter methods, the coordinates are set to the active layers origin. Then you need to move your code to a different method backgroundInViewCoords() could work. Or directly drawBackgroundWithOptions_().