protected boolean onDrawItem ( final Canvas canvas , final Item item , final Point curScreenCoords , final Projection pProjection ) { final int state = ( mDrawFocusedItem && ( mFocusedItem == item ) ? OverlayItem . ITEM_STATE_FOCUSED_MASK : 0 ) ; final Drawable marker = ( item . getMarker ( state ) == null ) ? getDefaultMarker ( state ) : item . getMarker ( state ) ; final HotspotPlace hotspot = item . getMarkerHotspot ( ) ; boundToHotspot ( marker , hotspot ) ; int x = mCurScreenCoords . x ; int y = mCurScreenCoords . y ; marker . copyBounds ( mRect ) ; mRect . offset ( x , y ) ; RectL . getBounds ( mRect , x , y , pProjection . getOrientation ( ) , mOrientedMarkerRect ) ; final boolean displayed = Rect . intersects ( mOrientedMarkerRect , canvas . getClipBounds ( ) ) ; if ( displayed ) { if ( pProjection . getOrientation ( ) != 0 ) { // optimization: step 1/2 canvas . save ( ) ; canvas . rotate ( - pProjection . getOrientation ( ) , x , y ) ; } marker . setBounds ( mRect ) ; marker . draw ( canvas ) ; if ( pProjection . getOrientation ( ) != 0 ) { // optimization: step 2/2 canvas . restore ( ) ; } } return displayed ; }
Draws an item located at the provided screen coordinates to the canvas .