Interface CommonLCD

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void bitBlt​(byte[] src, int sw, int sh, int sx, int sy, byte[] dst, int dw, int dh, int dx, int dy, int w, int h, int rop)
      Standard two input BitBlt function.
      void bitBlt​(byte[] src, int sw, int sh, int sx, int sy, int dx, int dy, int w, int h, int rop)
      Standard two input BitBlt function with the LCD display as the destination.
      void clear()
      Clear the display.
      byte[] getDisplay()
      Provide access to the LCD display frame buffer.
      int getHeight()
      Return the height of the associated drawing surface.
      byte[] getHWDisplay()
      Get access to hardware LCD display.
      int getWidth()
      Return the width of the associated drawing surface.
      void refresh()
      Refresh the display.
      void setAutoRefresh​(boolean on)
      Turn on/off the automatic refresh of the LCD display.
      int setAutoRefreshPeriod​(int period)
      Set the period used to perform automatic refreshing of the display.
      void setContrast​(int contrast)
      Set the LCD contrast.
    • Method Detail

      • refresh

        void refresh()
        Refresh the display. If auto refresh is off, this method will wait until the display refresh has completed. If auto refresh is on it will return immediately.
      • clear

        void clear()
        Clear the display.
      • getWidth

        int getWidth()
        Return the width of the associated drawing surface.
        Note: This is a non standard method.
        Returns:
        width of the surface
      • getHeight

        int getHeight()
        Return the height of the associated drawing surface.
        Note: This is a non standard method.
        Returns:
        height of the surface.
      • getDisplay

        byte[] getDisplay()
        Provide access to the LCD display frame buffer.
        Returns:
        byte array that is the frame buffer.
      • getHWDisplay

        byte[] getHWDisplay()
        Get access to hardware LCD display.
        Returns:
        byte array that is the frame buffer
      • setContrast

        void setContrast​(int contrast)
        Set the LCD contrast.
        Parameters:
        contrast - 0 blank 0x60 full on
      • bitBlt

        void bitBlt​(byte[] src,
                    int sw,
                    int sh,
                    int sx,
                    int sy,
                    int dx,
                    int dy,
                    int w,
                    int h,
                    int rop)
        Standard two input BitBlt function with the LCD display as the destination. Supports standard raster ops and overlapping images. Images are held in native leJOS/Lego format.
        Parameters:
        src - byte array containing the source image
        sw - Width of the source image
        sh - Height of the source image
        sx - X position to start the copy from
        sy - Y Position to start the copy from
        dx - X destination
        dy - Y destination
        w - width of the area to copy
        h - height of the area to copy
        rop - raster operation.
      • bitBlt

        void bitBlt​(byte[] src,
                    int sw,
                    int sh,
                    int sx,
                    int sy,
                    byte[] dst,
                    int dw,
                    int dh,
                    int dx,
                    int dy,
                    int w,
                    int h,
                    int rop)
        Standard two input BitBlt function. Supports standard raster ops and overlapping images. Images are held in native leJOS/Lego format.
        Parameters:
        src - byte array containing the source image
        sw - Width of the source image
        sh - Height of the source image
        sx - X position to start the copy from
        sy - Y Position to start the copy from
        dst - byte array containing the destination image
        dw - Width of the destination image
        dh - Height of the destination image
        dx - X destination
        dy - Y destination
        w - width of the area to copy
        h - height of the area to copy
        rop - raster operation.
      • setAutoRefresh

        void setAutoRefresh​(boolean on)
        Turn on/off the automatic refresh of the LCD display. At system startup auto refresh is on.
        Parameters:
        on - true to enable, false to disable
      • setAutoRefreshPeriod

        int setAutoRefreshPeriod​(int period)
        Set the period used to perform automatic refreshing of the display. A period of 0 disables the refresh.
        Parameters:
        period - time in ms
        Returns:
        the previous refresh period.