Class ShaderType2.Type2PaintContext

java.lang.Object
com.sun.pdfview.pattern.ShaderType2.Type2PaintContext
All Implemented Interfaces:
PaintContext
Enclosing class:
ShaderType2

class ShaderType2.Type2PaintContext extends Object implements PaintContext
A simple paint context that uses an existing raster in device space to generate pixels
  • Field Details

    • colorModel

      private ColorModel colorModel
      the color model
    • start

      private Point2D start
      the start of the axis
    • end

      private Point2D end
      the end of the axis
  • Constructor Details

  • Method Details

    • dispose

      public void dispose()
      Specified by:
      dispose in interface PaintContext
    • getColorModel

      public ColorModel getColorModel()
      Specified by:
      getColorModel in interface PaintContext
    • getRaster

      public Raster getRaster(int x, int y, int w, int h)
      Specified by:
      getRaster in interface PaintContext
    • getXPrime

      private float getXPrime(float x, float y, float x0, float y0, float x1, float y1)
      x' = (x1 - x0) * (x - x0) + (y1 - y0) * (y - y0) ------------------------------------------- (x1 - x0)^2 + (y1 - y0)^2
    • getT

      private float getT(float xp)
      t = t0 + (t1 - t0) x x'