Barcode Scanner SDK
Barcode decoder library
com.manateeworks.MWOverlay Class Reference

Represents a MWOverlay class. More...

Inheritance diagram for com.manateeworks.MWOverlay:

Classes

enum  LayerType
 The type of layer MWOverlay sets. More...
 
enum  OverlayMode
 
enum  PauseMode
 The mode used when MWOverlay represents a paused state. More...
 

Public Member Functions

 MWOverlay (Context context)
 
void onDraw (Canvas canvas)
 

Static Public Member Functions

static MWOverlay addOverlay (Context context, View previewLayer)
 Adds a MWOverlay to a parent View. More...
 
static void removeOverlay ()
 Removes MWOverlay (if attached) from its parent.
 
static void setPaused (Context context, boolean paused)
 Changes the MWOverlay to represent a paused or running scanner state. More...
 
static void showLocation (PointF[] points, int imageWidth, int imageHeight)
 Show found barcode location by drawing lines over the preview. More...
 
static void showLocations (PointF[] points, int imageWidth, int imageHeight)
 Show found barcode locations by drawing lines over the preview. More...
 
static void addViewFinderToView (Context context, RelativeLayout scannerView, boolean isFullScreen)
 

Static Public Attributes

static OverlayMode overlayMode = OverlayMode.OM_LEGACY
 Default configuration values for MWOverlay.
 
static PauseMode pauseMode = PauseMode.PM_PAUSE
 
static boolean isAttached = false
 
static boolean isViewportVisible = true
 
static boolean isBlinkingLineVisible = true
 
static boolean isTargetRectVisible = true
 
static float targetRectLineWidth = 3.0f
 
static float targetRectLineAlpha = 0.5f
 
static int targetRectLineColor = 0xffff00
 
static float viewportLineWidth = 3.0f
 
static float blinkingLineWidth = 1.0f
 
static float locationLineWidth = 4.0f
 
static float viewportAlpha = 0.5f
 
static float viewportLineAlpha = 0.5f
 
static float blinkingLineAlpha = 1.0f
 
static float blinkingSpeed = 0.25f
 
static int viewportLineColor = 0xff0000
 
static int blinkingLineColor = 0xff0000
 
static int locationLineColor = 0x00ff00
 

Detailed Description

Represents a MWOverlay class.

Provides a viewfinder overlay for the scanner's preview.

Member Function Documentation

◆ addOverlay()

static MWOverlay com.manateeworks.MWOverlay.addOverlay ( Context  context,
View  previewLayer 
)
inlinestatic

Adds a MWOverlay to a parent View.

Parameters
contextActivity context
previewLayerparent view to add the MWOverlay to
Returns
MWOverlay viewport layer

◆ setPaused()

static void com.manateeworks.MWOverlay.setPaused ( Context  context,
boolean  paused 
)
inlinestatic

Changes the MWOverlay to represent a paused or running scanner state.

Parameters
contextActivity context
pausedtrue if scanner is paused

◆ showLocation()

static void com.manateeworks.MWOverlay.showLocation ( PointF[]  points,
int  imageWidth,
int  imageHeight 
)
inlinestatic

Show found barcode location by drawing lines over the preview.

Parameters
pointsarray of points holding the coordinates of the barcode
imageWidthimage width
imageHeightimage height

◆ showLocations()

static void com.manateeworks.MWOverlay.showLocations ( PointF[]  points,
int  imageWidth,
int  imageHeight 
)
inlinestatic

Show found barcode locations by drawing lines over the preview.

Parameters
pointsarray of points holding the coordinates of the barcode
imageWidthimage width
imageHeightimage height

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