public interface ScalerDebugger
Scalers, it is useful to have access
to internal data structures. In a typical C/C++ environment, this is
achieved with debugging code bracketed by #IFDEF statements. This
technique is no available in Java; here is the pattern we follow
instead:
- this interface is meant to be called by the scalers, so that they
can communicate interesting events and values to outside.
- scalers have a Scaler.setDebugger(ScalerDebugger) method
which can be called by the development environment to provide an
implementation of this interface, and therefore receive events.
This method typically stores the ScalerDebugger instance
in a field, e.g. debugger.
- inside a scaler, the typical pattern is at an instrumentation point
is:
if (ScalerDebugger.debugOn && debugger != null) {
this.debugger.foo (...); }
Note that all the code related to debugging is protected the static
final boolean debugOn. If that constant is false (the normal
value for checked-in code and therefore for shipped code), then much
of the code related to debugging is eliminated by the compiler,
and we are left with a small overhead (a trivial setDebugger method
in the scalers, a field, and the class for this interface).
During development, one can set this constant to true to get fully
functional debugging.| Modifier and Type | Field and Description |
|---|---|
static boolean |
debugOn
Enable or disable debugging support.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cscanCross(double x,
double y) |
OutlineConsumer2 |
getCFFOutlineConsumer() |
void |
hintedTTOutline(TTOutline outline) |
void |
ttInterpLog(String s) |
void |
ttScanHCross(int coordOnScanLine,
int scanLineCoordI,
boolean on) |
void |
ttScanLine(int x1,
int y1,
int x2,
int y2) |
void |
ttScanLog(String s) |
void |
ttScanQuadCurve(int x1,
int y1,
int x2,
int y2,
int x3,
int y3) |
void |
ttScanScanType(int scanType) |
void |
ttScanVCross(int coordOnScanLine,
int scanLineCoordI,
boolean on) |
void |
unhintedTTOutline(TTOutline outline) |
static final boolean debugOn
void ttInterpLog(String s)
void cscanCross(double x,
double y)
OutlineConsumer2 getCFFOutlineConsumer()
void unhintedTTOutline(TTOutline outline)
void hintedTTOutline(TTOutline outline)
void ttScanScanType(int scanType)
void ttScanLog(String s)
void ttScanLine(int x1,
int y1,
int x2,
int y2)
void ttScanQuadCurve(int x1,
int y1,
int x2,
int y2,
int x3,
int y3)
void ttScanHCross(int coordOnScanLine,
int scanLineCoordI,
boolean on)
void ttScanVCross(int coordOnScanLine,
int scanLineCoordI,
boolean on)
Copyright © 2010 - 2020 Adobe. All Rights Reserved