CORE POS - IS4C
The CORE POS front end
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Bitmap Class Reference

Public Member Functions

 returnError ($err=null, $ret=null)
 
 parseInt ($data, $left=0, $right=-1, $signed=false, $bigEndian=false)
 
 renderInt ($val, $bytes, $signed=false, $bigEndian=false)
 
 lastError ($reset=true)
 
 load ($filename, $filedata=null)
 
 Bitmap ($width=1, $height=1, $bpp=1, $dpi=72)
 
 save ($filename)
 
 getWidth ()
 
 getHeight ()
 
 getColorDepth ()
 
 getHorizResolution ($asDPI=false)
 
 getVertResolution ($asDPI=false)
 
 getPaletteSize ()
 
 getPaletteColor ($index, $channel=null)
 
 getPixelValue ($x, $y)
 
 setPixelValue ($x, $y, $val)
 
 drawLine ($x0, $y0, $x1, $y1, $val)
 
 getPixelColor ($x, $y, $channel=null)
 
 getRawData ()
 
 getRawBytesPerRow ()
 

Static Public Member Functions

static barGraph ($percent, $width=200, $height=40)
 
static renderBitmap ($arg)
 

Public Attributes

 $DIB1
 
 $DIB2
 
 $DIB3
 
 $DIB4
 
 $DIB5
 
 $error
 
 $magic
 
 $dibVersion
 
 $width
 
 $height
 
 $bpp
 
 $hppm
 
 $vppm
 
 $palSize
 
 $palSizeImp
 
 $palette
 
 $image
 
 $rowBytes
 

Member Function Documentation

static Bitmap::barGraph (   $percent,
  $width = 200,
  $height = 40 
)
static

Generate a bar graph bitmap

Parameters
$percent(0.05 and 5 both represent 5%)
$widthdefault 200
$heightdefault 40
Returns
Bitmap object
Bitmap::load (   $filename,
  $filedata = null 
)

modification by Andy 09Aug13 I think this makes more sense and it's incorrect to assume all zero bytes at the end of the image are padding

static Bitmap::renderBitmap (   $arg)
static

Turn bitmap into receipt string

Parameters
$argstring filename OR Bitmap obj
Returns
receipt-formatted string

The documentation for this class was generated from the following file: