87 return new TraceDrawLine(this);
88 }
89
90 private static class TraceDrawLine extends DrawLine {
91 DrawLine target;
92
93 public TraceDrawLine(DrawLine target) {
94 super(target.getSourceType(),
95 target.getCompositeType(),
96 target.getDestType());
97 this.target = target;
98 }
99
100 public GraphicsPrimitive traceWrap() {
101 return this;
102 }
103
104 public void DrawLine(SunGraphics2D sg2d, SurfaceData dest,
105 int x1, int y1, int x2, int y2)
106 {
107 tracePrimitive(target);
108 target.DrawLine(sg2d, dest, x1, y1, x2, y2);
109 }
110 }
111 }
|
87 return new TraceDrawLine(this);
88 }
89
90 private static class TraceDrawLine extends DrawLine {
91 DrawLine target;
92
93 public TraceDrawLine(DrawLine target) {
94 super(target.getSourceType(),
95 target.getCompositeType(),
96 target.getDestType());
97 this.target = target;
98 }
99
100 public GraphicsPrimitive traceWrap() {
101 return this;
102 }
103
104 public void DrawLine(SunGraphics2D sg2d, SurfaceData dest,
105 int x1, int y1, int x2, int y2)
106 {
107 if ((traceflags & TRACEPTIME) == 0) {
108 tracePrimitive(target);
109 }
110 long time = System.nanoTime();
111 target.DrawLine(sg2d, dest, x1, y1, x2, y2);
112 tracePrimitiveTime(target, System.nanoTime() - time);
113 }
114 }
115 }
|