![]() TypeError - if start_pos or end_pos is not a sequence ofĪalines(surface, color, closed, points, blend=1) -> Rectĭraws a sequence of contiguous straight antialiased lines on the givenīlend ( int) - (optional) (deprecated) if non-zero (default) each line will be blended Values will be truncated) and its width and height will be 0 Return type With the surface's existing pixel shades, otherwise it will overwrite themĪ rect bounding the changed pixels, if nothing is drawn theīounding rect's position will be the start_pos parameter value (float List ( int or float, int or float ) or Vector2 ( int or float, int or float )) - end position of the line, (x, y)īlend ( int) - (optional) (deprecated) if non-zero (default) the line will be blended List ( int or float, int or float ) or Vector2 ( int or float, int or float )) - start position of the line, (x, y)Įnd_pos ( tuple ( int or float, int or float ) or Start_pos ( tuple ( int or float, int or float ) or The point (1.4, 2) covers 60% of the pixel (1, 2) and 40% of the Two (or four if both numbers have decimal parts) adjacent pixels, e.g. Of the numbers have non-zero decimal parts would be partially covering Of said pixel (and having a height and width of 1 pixel would thereforeĬompletely cover it), while a point with coordinate where one (or both) Regarding float values for coordinates, a point with coordinateĬonsisting of two whole numbers is considered being right in the center Points a line segment will be drawnįrom (x1, y1) to (x2, y2) and from (x2, y2) to (x3, 圓),Īdditionally if the closed parameter is True another line segment Tuple/list/ 2 a 2-Dimensional Vector of 2 ints/floats and adjacentĬoordinates will be connected by a line segment, e.g. Points ( tuple ( coordinate ) or list ( coordinate )) - a sequence of 2 or more (x, y) coordinates, where each The first and last points in the points sequence ParametersĬolor ( Color or int or tuple ( int, int, int, )) - color to draw with, the alpha value is optional if using aĬlosed ( bool) - if True an additional line segment is drawn between ![]() For thick lines the ends are squared off.ĭrawing thick lines with sharp corners can have undesired looking results. Lines(surface, color, closed, points, width=1) -> Rectĭraws a sequence of contiguous straight lines on the given surface. (optional) used for setting the value of bottom right If you don't set this value, it will use the border_radius value.īorder_top_right_radius ( int) - (optional) used for setting the value of top rightīorder_bottom_left_radius ( int) - (optional) used for setting the value of bottom left ![]() The supported range is, with 0 representing a rectangleīorder_top_left_radius ( int) - (optional) used for setting the value of top leftīorder. Which had half the width spill outside the rect area.īorder_radius ( int) - (optional) used for drawing rectangle with rounded corners. Rect's area, rather than using an internal call to draw.lines(), Changed in pygame 2.1.1: Drawing rects with width now draws the width correctly inside the ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |