     ctx = @plot_view.ctx
 
     ctx.save()
+   #duped
+    selected = @mget_obj('data_source').get('selected')
+    for idx in selected
+      @selected_mask[idx] = true
+
     if @glyph_props.fast_path
       @_fast_path(ctx)
     else
-      @_full_path(ctx)
-    ctx.restore()
+     if selected and selected.length and @nonselection_glyphprops
+        if @selection_glyphprops
+          props =  @selection_glyphprops
+        else
+          props = @glyph_props
+        @_full_path(ctx, props, 'selected')
+        @_full_path(ctx, @nonselection_glyphprops, 'unselected')
+      else
+        @_full_path(ctx)
+      ##duped in many classes
+     ctx.restore()
 
   _fast_path: (ctx) ->
     if @do_fill

class AnnulusView extends GlyphView

  initialize: (options) ->
    glyphspec = @mget('glyphspec')
    @glyph_props = new glyph_properties(
      @,
      glyphspec,
      ['x', 'y', 'inner_radius', 'outer_radius'],


    ctx.restore()

  ##duped
  select : (xscreenbounds, yscreenbounds) ->
    xscreenbounds = [@plot_view.view_state.sx_to_device(xscreenbounds[0]),
      @plot_view.view_state.sx_to_device(xscreenbounds[1])]
    yscreenbounds = [@plot_view.view_state.sy_to_device(yscreenbounds[0]),
      @plot_view.view_state.sy_to_device(yscreenbounds[1])]
    xscreenbounds = [_.min(xscreenbounds), _.max(xscreenbounds)]
    yscreenbounds = [_.min(yscreenbounds), _.max(yscreenbounds)]
    selected = []
    for i in [0..@sx.length-1]
      if xscreenbounds
        if @sx[i] < xscreenbounds[0] or @sx[i] > xscreenbounds[1]
          continue
      if yscreenbounds
        if @sy[i] < yscreenbounds[0] or @sy[i] > yscreenbounds[1]
          continue
      selected.push(i)
     return selected


class Annulus extends Glyph
  default_view: AnnulusView
