26 package sun.java2d; 27 28 import java.awt.*; 29 import java.awt.font.*; 30 import java.awt.geom.*; 31 import java.awt.image.*; 32 import java.nio.*; 33 34 import sun.awt.*; 35 import sun.awt.image.*; 36 import sun.java2d.loops.*; 37 import sun.java2d.pipe.*; 38 import sun.lwawt.macosx.*; 39 40 import java.lang.annotation.Native; 41 42 /* 43 * This is the SurfaceData for a CGContextRef. 44 */ 45 public abstract class OSXSurfaceData extends BufImgSurfaceData { 46 final static float UPPER_BND = Float.MAX_VALUE / 2.0f; 47 final static float LOWER_BND = -UPPER_BND; 48 49 protected static CRenderer sQuartzPipe = null; 50 protected static CTextPipe sCocoaTextPipe = null; 51 protected static CompositeCRenderer sQuartzCompositePipe = null; 52 53 private GraphicsConfiguration fConfig; 54 private Rectangle fBounds; // bounds in user coordinates 55 56 static { 57 sQuartzPipe = new CRenderer(); // Creates the singleton quartz pipe. 58 } 59 60 // NOTE: Any subclasses must eventually call QuartzSurfaceData_InitOps in OSXSurfaceData.h 61 // This sets up the native side for the SurfaceData, and is required. 62 public OSXSurfaceData(SurfaceType sType, ColorModel cm) { 63 this(sType, cm, null, new Rectangle()); 64 } 65 66 public OSXSurfaceData(SurfaceType sType, ColorModel cm, GraphicsConfiguration config, Rectangle bounds) { 67 super(sType, cm); | 26 package sun.java2d; 27 28 import java.awt.*; 29 import java.awt.font.*; 30 import java.awt.geom.*; 31 import java.awt.image.*; 32 import java.nio.*; 33 34 import sun.awt.*; 35 import sun.awt.image.*; 36 import sun.java2d.loops.*; 37 import sun.java2d.pipe.*; 38 import sun.lwawt.macosx.*; 39 40 import java.lang.annotation.Native; 41 42 /* 43 * This is the SurfaceData for a CGContextRef. 44 */ 45 public abstract class OSXSurfaceData extends BufImgSurfaceData { 46 static final float UPPER_BND = Float.MAX_VALUE / 2.0f; 47 static final float LOWER_BND = -UPPER_BND; 48 49 protected static CRenderer sQuartzPipe = null; 50 protected static CTextPipe sCocoaTextPipe = null; 51 protected static CompositeCRenderer sQuartzCompositePipe = null; 52 53 private GraphicsConfiguration fConfig; 54 private Rectangle fBounds; // bounds in user coordinates 55 56 static { 57 sQuartzPipe = new CRenderer(); // Creates the singleton quartz pipe. 58 } 59 60 // NOTE: Any subclasses must eventually call QuartzSurfaceData_InitOps in OSXSurfaceData.h 61 // This sets up the native side for the SurfaceData, and is required. 62 public OSXSurfaceData(SurfaceType sType, ColorModel cm) { 63 this(sType, cm, null, new Rectangle()); 64 } 65 66 public OSXSurfaceData(SurfaceType sType, ColorModel cm, GraphicsConfiguration config, Rectangle bounds) { 67 super(sType, cm); |