Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Create a polygon from a list of points

@type points: List
@param points: List of Vectors that make up the polygon

        	@staticmethod
	def from_pointlist(points):
		"""Create a polygon from a list of points
		
		@type points: List
		@param points: List of Vectors that make up the polygon
		"""

		p = Polygon()
		p.points = points
		return p
        


src/p/y/Py2D-HEAD/py2d/SVG.py   Py2D(Download)
				# close line by only moving relative_pos to first vertex
 
				polys.append(transform * Polygon.from_pointlist(verts))
				relative_pos = verts[0]
				verts = []
 
		if verts:
			polys.append(transform * Polygon.from_pointlist(verts))
		#print "----"
 

src/p/y/py2d-0.1/py2d/SVG.py   py2d(Download)
				# close line by only moving relative_pos to first vertex
 
				polys.append(transform * Polygon.from_pointlist(verts))
				relative_pos = verts[0]
				verts = []
 
		if verts:
			polys.append(transform * Polygon.from_pointlist(verts))
		#print "----"