1 package org.catacomb.datalish; 2 3 import org.catacomb.datalish.SColor; 4 import org.catacomb.datalish.array.Array; 5 6 7 public class SpritePart { 8 9 double[] xpts; 10 double[] ypts; 11 double lineWidth; 12 SColor lineColor; 13 SColor fillColor; 14 15 int ocf; 16 17 public SpritePart(double[] xp, double[] yp, double lw, SColor lc, SColor fc, int c) { 18 xpts = xp; 19 ypts = yp; 20 lineWidth = lw; 21 lineColor = lc; 22 fillColor = fc; 23 ocf = c; 24 25 } 26 27 public void pushBox(Box b) { 28 b.extendTo(xpts, ypts); 29 30 } 31 32 public double[] copyXpts() { 33 return Array.arrayCopy(xpts); 34 } 35 36 public double[] copyYpts() { 37 return Array.arrayCopy(ypts); 38 39 } 40 41 public boolean open() { 42 return (ocf == 0); 43 } 44 45 public boolean closed() { 46 return (ocf == 1); 47 } 48 49 public boolean filled() { 50 return (ocf == 2); 51 } 52 53 public SColor getLineColor() { 54 return lineColor; 55 } 56 57 public SColor getFillColor() { 58 return fillColor; 59 } 60 61 }