Help extending PFont class
in
Programming Questions
•
1 year ago
I'm trying to extend the PFont class as I want to add some extra processing to the Glyphs (levels of contrast and sharpen).
However, I'm not sure how to do this.. my tests say "cannot convert from PFont to NewFont. Should I be "implementing" instead. I want it to work and other classes to see it as a PFont - I just want to override a couple functions.
So something like this should work:
And setting things with it should work.
However, I'm not sure how to do this.. my tests say "cannot convert from PFont to NewFont. Should I be "implementing" instead. I want it to work and other classes to see it as a PFont - I just want to override a couple functions.
So something like this should work:
- NewFont new = createFont("Arial", 9, true);
And setting things with it should work.
- textFont(new);
Thanks!
1