Draw tracked features in blue, or red if they were just spawned.
198882
private void updateGUI(SimpleImageSequence<T> sequence) {
		BufferedImage orig = sequence.getGuiImage();
		Graphics2D g2 = orig.createGraphics();

		// draw tracks with semi-unique colors so you can track individual points with your eyes
		for( PointTrack p : tracker.getActiveTracks(null) ) {
			int red = (int)(2.5*(p.featureId%100));
			int green = (int)((255.0/150.0)*(p.featureId%150));
			int blue = (int)(p.featureId%255);
			VisualizeFeatures.drawPoint(g2, (int)p.x, (int)p.y, new Color(red,green,blue));
		}

		// draw tracks which have just been spawned green
		for( PointTrack p : tracker.getNewTracks(null) ) {
			VisualizeFeatures.drawPoint(g2, (int)p.x, (int)p.y, Color.green);
		}

		// tell the GUI to update
		gui.setImage(orig);
		gui.repaint();
	}
1298841
protected void drawFeatures( float scale , int offsetX , int offsetY ,
								 FastQueue<Point2D_F64> all,
								 FastQueue<Point2D_F64> inliers,
								 Homography2D_F64 currToGlobal, Graphics2D g2 ) {

		Point2D_F64 distPt = new Point2D_F64();

		for( int i = 0; i < all.size; i++  ) {
			HomographyPointOps_F64.transform(currToGlobal, all.get(i), distPt);

			distPt.x = offsetX + distPt.x*scale;
			distPt.y = offsetY + distPt.y*scale;

			VisualizeFeatures.drawPoint(g2, (int) distPt.x, (int) distPt.y, Color.RED);
		}

		for( int i = 0; i < inliers.size; i++  ) {
			HomographyPointOps_F64.transform(currToGlobal,inliers.get(i),distPt);

			distPt.x = offsetX + distPt.x*scale;
			distPt.y = offsetY + distPt.y*scale;

			VisualizeFeatures.drawPoint(g2, (int) distPt.x, (int) distPt.y, Color.BLUE);
		}
	}
6609
def draw_feature_layer(self, surf, feature):
    """"""
    layer = feature.unpack(self._obs.observation)
    if layer is not None:
      surf.blit_np_array(feature.color(layer))
    else:  # Ignore layers that aren't in this version of SC2.
      surf.surf.fill(colors.black)
32805
def draw(self, milliseconds, surface):
        """"""
        self.drawn_rects = []
        cam = Ragnarok.get_world().Camera
        cX, cY, cXMax, cYMax = cam.get_cam_bounds()

        #Draw out only the tiles visible to the camera.
        start_pos = self.pixels_to_tiles( (cX, cY) )
        start_pos -= Vector2(1, 1)
        end_pos = self.pixels_to_tiles( (cXMax, cYMax) )
        end_pos += Vector2(1, 1)

        start_pos.X, start_pos.Y = self.clamp_within_range(start_pos.X, start_pos.Y)
        end_pos.X, end_pos.Y = self.clamp_within_range(end_pos.X, end_pos.Y)

        cam_pos = cam.get_world_pos()
        for x in range(start_pos.X, end_pos.X + 1):
            for y in range(start_pos.Y, end_pos.Y + 1):
                tile = self.tiles[y][x]
                translate_posX = tile.coords.X - cam_pos.X
                translate_posY = tile.coords.Y - cam_pos.Y
                surface.blit(self.spritesheet.image, (translate_posX, translate_posY), tile.source, special_flags = 0)
837814
def draw_dot(self, pos, color):
        
        if 0 <= pos[0] < self.width and 0 <= pos[1] < self.height:
            self.matrix[pos[0]][pos[1]] = color
1356745
@Override
	public void spawnTracks() {
		for (int setIndex = 0; setIndex < sets.length; setIndex++) {
			SetTrackInfo<Desc> info = sets[setIndex];

			// setup data structures
			if( info.isAssociated.length < info.featDst.size ) {
				info.isAssociated = new boolean[ info.featDst.size ];
			}

			// see which features are associated in the dst list
			for( int i = 0; i < info.featDst.size; i++ ) {
				info.isAssociated[i] = false;
			}

			for( int i = 0; i < info.matches.size; i++ ) {
				info.isAssociated[info.matches.data[i].dst] = true;
			}

			// create new tracks from latest unassociated detected features
			for( int i = 0; i < info.featDst.size; i++ ) {
				if( info.isAssociated[i] )
					continue;

				Point2D_F64 loc = info.locDst.get(i);
				addNewTrack(setIndex, loc.x,loc.y,info.featDst.get(i));
			}
		}

	}
572897
def on_paint(self, event):
        ''''''
        dc = wx.AutoBufferedPaintDC(self)
        dc.DrawBitmap(self._bmp, 0, 0)
1078658
def draw(self):
        """"""
        from onshapepy import Part
        CAD = Part(
            'https://cad.onshape.com/documents/b4cfd328713460beeb3125ac/w/3928b5c91bb0a0be7858d99e/e/6f2eeada21e494cebb49515f'
        )
        CAD.params = {
            'channel_L': self.channel_L,
            'channel_W': self.channel_W,
            'channel_H': self.downstream_H,
            'channel_pairs': self.channel_n/2,
            'baffle_S': self.baffle_S,
        }
1167130
private ColorPickerSwatch createColorSwatch(int color, int selectedColor) {
        ColorPickerSwatch view = new ColorPickerSwatch(getContext(), color,
                color == selectedColor, mOnColorSelectedListener);
        TableRow.LayoutParams params = new TableRow.LayoutParams(mSwatchLength, mSwatchLength);
        params.setMargins(mMarginSize, mMarginSize, mMarginSize, mMarginSize);
        view.setLayoutParams(params);
        return view;
    }
825728
def draw_bars(out_value, features, feature_type, width_separators, width_bar):
    """"""
    rectangle_list = []
    separator_list = []
    
    pre_val = out_value
    for index, features in zip(range(len(features)), features):
        if feature_type == 'positive':
            left_bound = float(features[0])
            right_bound = pre_val
            pre_val = left_bound
            
            separator_indent = np.abs(width_separators)
            separator_pos = left_bound
            colors = ['#FF0D57', '#FFC3D5']
        else:
            left_bound = pre_val
            right_bound = float(features[0])
            pre_val = right_bound
            
            separator_indent = - np.abs(width_separators)
            separator_pos = right_bound
            colors = ['#1E88E5', '#D1E6FA']
        
        # Create rectangle
        if index == 0:
            if feature_type == 'positive':
                points_rectangle = [[left_bound, 0],
                                    [right_bound, 0],
                                    [right_bound, width_bar],
                                    [left_bound, width_bar],
                                    [left_bound + separator_indent, (width_bar / 2)]
                                    ]
            else:
                points_rectangle = [[right_bound, 0],
                                    [left_bound, 0],
                                    [left_bound, width_bar],
                                    [right_bound, width_bar],
                                    [right_bound + separator_indent, (width_bar / 2)]
                                    ]
        
        else:
            points_rectangle = [[left_bound, 0],
                                [right_bound, 0],
                                [right_bound + separator_indent * 0.90, (width_bar / 2)],
                                [right_bound, width_bar],
                                [left_bound, width_bar],
                                [left_bound + separator_indent * 0.90, (width_bar / 2)]]

        line = plt.Polygon(points_rectangle, closed=True, fill=True,
                           facecolor=colors[0], linewidth=0)
        rectangle_list += [line]

        # Create seperator
        points_separator = [[separator_pos, 0],
                            [separator_pos + separator_indent, (width_bar / 2)],
                            [separator_pos, width_bar]]
        
        line = plt.Polygon(points_separator, closed=None, fill=None,
                           edgecolor=colors[1], lw=3)
        separator_list += [line]

    return rectangle_list, separator_list
893737
def draw(self):
        '''
        
        '''
        observed_arr = self.__image_true_sampler.draw()
        observed_arr = self.add_condition(observed_arr)
        return observed_arr
1342967
def draw(self):
        '''
        
        '''
        if self.__conditional_flag is True:
            return np.concatenate((self.__create_samples(), self.__create_samples()), axis=1)
        else:
            return self.__create_samples()
473983
def _find_palettes(stream):
    '''  '''
    chosen = choose_palette(stream=stream)
    palettes = get_available_palettes(chosen)
    fg = ForegroundPalette(palettes=palettes)
    fx = EffectsPalette(palettes=palettes)
    return fg, fx, chosen
568633
def refresh(self):
        
        for cbar in self.colorbars:
            cbar.draw_all()
        self.canvas.draw()
810221
def _draw_lines_internal(self, coords, colour, bg):
        """"""
        for i, (x, y) in enumerate(coords):
            if i == 0:
                self._screen.move(x, y)
            else:
                self._screen.draw(x, y, colour=colour, bg=bg, thin=True)
130568
def draw(self, surfaceObj):
        """"""
        if self._visible:
            if self.buttonDown:
                surfaceObj.blit(self.surfaceDown, self._rect)
            elif self.mouseOverButton:
                surfaceObj.blit(self.surfaceHighlight, self._rect)
            else:
                surfaceObj.blit(self.surfaceNormal, self._rect)
1058488
function() {
        for ( var i = 0; i < this._items.length; i++ ) {
            this._items[i].draw();
        }

        this._needsDraw = false;
    }