Rectangle outline2/28/2023 ValueError - if len(points) < 2 (must have at least 2 points) Points parameter (float values will be truncated) and its width and With the surface's existing pixel shades, otherwise the pixels will beīounding rect's position will be the position of the first point in the 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) 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) 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. Of the () draw a straight line function.īorder_radius ( int) - (optional) used for drawing rectangle with rounded corners. How the thickness for edge lines grow, refer to the width notes Outside the original boundary of the rect. When using width values > 1, the edge lines will grow
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |