To draw on a buffered image, create a graphics context on the buffered image. // Create a graphics context on the buffered image Graphics2D g2d = bimage.createGraphics(); // Draw on the image g2d.setColor(Color.red); g2d.fill(new Ellipse2D.Float(0, 0
封装了一个简单的2d绘图函数 from matplotlib import pyplot as plt def plot_line(*args, **kw): """ :param args: x,y,... :param kw: name, xlabel, ylabel,... :return: """ name = 'line_chart' if 'name' in kw: name = kw['name'] kw.pop('name') x
Images in accelerated memory are much faster to draw on the screen. This example demonstrates how to take an image and make an accelerated copy of it and then use it to draw on the screen. The problem with images in accelerated memory is that they ca