var searchIndex = {}; searchIndex["graphics"] = {"doc":"A library for 2D graphics that works with multiple back-ends.","items":[[8,"ImageSize","graphics","Implemented by all images to be used with generic algorithms.",null,null],[10,"get_size","","Get the image size.",0,null],[11,"get_width","","Gets the image width.",0,null],[11,"get_height","","Gets the image height.",0,null],[3,"Viewport","","Stores viewport information.",null,null],[12,"rect","","Viewport in pixels.\n```[x, y, width height]``` where ```(x, y)``` is lower left corner.",1,null],[12,"draw_size","","The size of frame buffer in pixels.",1,null],[12,"window_size","","The size of window in points.",1,null],[5,"clear","","Clears the screen.",null,{"inputs":[{"name":"color"},{"name":"g"}],"output":null}],[5,"image","","Draws image.",null,null],[5,"ellipse","","Draws ellipse.",null,{"inputs":[{"name":"color"},{"name":"r"},{"name":"matrix2d"},{"name":"g"}],"output":null}],[5,"circle_arc","","Draws arc",null,{"inputs":[{"name":"color"},{"name":"radius"},{"name":"scalar"},{"name":"scalar"},{"name":"r"},{"name":"matrix2d"},{"name":"g"}],"output":null}],[5,"rectangle","","Draws rectangle.",null,{"inputs":[{"name":"color"},{"name":"r"},{"name":"matrix2d"},{"name":"g"}],"output":null}],[5,"polygon","","Draws polygon.",null,{"inputs":[{"name":"color"},{"name":"polygon"},{"name":"matrix2d"},{"name":"g"}],"output":null}],[5,"line","","Draws line.",null,{"inputs":[{"name":"color"},{"name":"radius"},{"name":"l"},{"name":"matrix2d"},{"name":"g"}],"output":null}],[5,"text","","Draws text.",null,{"inputs":[{"name":"color"},{"name":"fontsize"},{"name":"str"},{"name":"c"},{"name":"matrix2d"},{"name":"g"}],"output":null}],[0,"draw_state","","Graphics draw state.",null,null],[3,"DrawState","graphics::draw_state","Graphics draw state used for blending, clipping and stencil rendering.",null,null],[12,"scissor","","Scissor mask to use. If set, no pixel outside of this\nrectangle (in screen space) will be written to as a result of rendering.",2,null],[12,"stencil","","Stencil test to use. If None, no stencil testing is done.",2,null],[12,"blend","","Blend function to use. If None, blending is disabled.",2,null],[4,"Blend","","The blend setting to use when drawing.",null,null],[13,"Alpha","","Alpha blending (allows semi-transparent pixels).",3,null],[13,"Add","","Additive blending.",3,null],[13,"Multiply","","Multiply color components.",3,null],[13,"Invert","","Invert colors when rendering a white shape.",3,null],[4,"Stencil","","Stencil buffer settings.",null,null],[13,"Clip","","Draw to stencil buffer.",4,null],[13,"Inside","","Draw pixels that have stencil value.",4,null],[13,"Outside","","Draw pixels that does not have stencil value.",4,null],[11,"partial_cmp","","",2,null],[11,"lt","","",2,null],[11,"le","","",2,null],[11,"gt","","",2,null],[11,"ge","","",2,null],[11,"fmt","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"clone","","",2,null],[11,"default","","",2,{"inputs":[],"output":{"name":"self"}}],[11,"new_alpha","","Uses alpha blending.",2,{"inputs":[],"output":{"name":"drawstate"}}],[11,"new_clip","","Draws to stencil buffer with value 255.\nThis can be used for clipping.",2,{"inputs":[],"output":{"name":"drawstate"}}],[11,"new_inside","","Tests against stencil buffer with value 255.\nDraws inside the shape defined by stencil buffer.",2,{"inputs":[],"output":{"name":"drawstate"}}],[11,"new_outside","","Tests against stencil buffer with value 255.\nDraws outside the shape defined by stencil buffer.",2,{"inputs":[],"output":{"name":"drawstate"}}],[11,"blend","","Sets blending.",2,null],[11,"scissor","","Sets scissor `[x, y, w, h]`.",2,null],[11,"partial_cmp","","",3,null],[11,"eq","","",3,null],[11,"fmt","","",3,null],[11,"clone","","",3,null],[11,"partial_cmp","","",4,null],[11,"lt","","",4,null],[11,"le","","",4,null],[11,"gt","","",4,null],[11,"ge","","",4,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"fmt","","",4,null],[11,"clone","","",4,null],[0,"character","graphics","A text character",null,null],[3,"Character","graphics::character","Holds rendered character data.",null,null],[12,"offset","","The offset of character.",5,null],[12,"size","","The size of character, including space.",5,null],[12,"texture","","The texture of the character.",5,null],[8,"CharacterCache","","Stores characters in a buffer and loads them by demand.",null,null],[16,"Texture","","The textyre type associated with the character cache.",6,null],[10,"character","","Get reference to character.",6,null],[11,"width","","Return the width for some given text.",6,null],[11,"clone","","",5,null],[11,"left","","The left offset.",5,null],[11,"top","","The top offset.",5,null],[11,"width","","Gets width of character, including space to the next one.",5,null],[11,"height","","Sets height of character, including space to the next one.",5,null],[0,"context","graphics","Transformation context",null,null],[3,"Context","graphics::context","Drawing 2d context.",null,null],[12,"viewport","","Viewport information.",7,null],[12,"view","","View transformation.",7,null],[12,"transform","","Current transformation.",7,null],[12,"draw_state","","Current draw state settings.",7,null],[11,"clone","","",7,null],[11,"new","","Creates a new drawing context.",7,{"inputs":[],"output":{"name":"context"}}],[11,"new_viewport","","Creates a new context with absolute transform in point coordinates.",7,{"inputs":[{"name":"viewport"}],"output":{"name":"context"}}],[11,"new_abs","","Creates a new drawing context in absolute coordinates.",7,{"inputs":[{"name":"scalar"},{"name":"scalar"}],"output":{"name":"context"}}],[11,"view","","Moves the current transform to the view coordinate system.",7,null],[11,"reset","","Moves the current transform to the default coordinate system.",7,null],[11,"store_view","","Stores the current transform as new view.",7,null],[11,"get_view_size","","Computes the current view size.",7,null],[0,"color","graphics","Helper methods for colors",null,null],[5,"grey","graphics::color","Returns a grey color",null,{"inputs":[{"name":"colorcomponent"}],"output":{"name":"color"}}],[5,"alpha","","Returns a semi-transparent white color",null,{"inputs":[{"name":"colorcomponent"}],"output":{"name":"color"}}],[5,"hex","","Converts from hexadecimal color format",null,{"inputs":[{"name":"str"}],"output":{"name":"color"}}],[5,"gamma_srgb_to_linear","","Converts gamma (brightness) from sRGB to linear color space.",null,{"inputs":[{"name":"color"}],"output":{"name":"color"}}],[5,"gamma_linear_to_srgb","","Converts gamma (brightness) of a color from linear color space to sRGB.",null,{"inputs":[{"name":"color"}],"output":{"name":"color"}}],[17,"WHITE","","White color.",null,null],[17,"BLACK","","Black color.",null,null],[17,"TRANSPARENT","","Transparent color.",null,null],[0,"polygon","graphics","Draw polygon",null,null],[3,"Polygon","graphics::polygon","A polygon",null,null],[12,"color","","The color of the polygon",8,null],[11,"clone","","",8,null],[11,"new","","Creates new polygon",8,{"inputs":[{"name":"color"}],"output":{"name":"polygon"}}],[11,"color","","Sets color.",8,null],[11,"draw","","Draws polygon using the default method.",8,null],[11,"draw_tri","","Draws polygon using triangulation.",8,null],[11,"draw_tween_lerp","","Draws tweened polygon with linear interpolation, using default method.",8,null],[11,"draw_tween_lerp_tri","","Draws tweened polygon with linear interpolation, using triangulation.",8,null],[0,"line","graphics","Draw Line",null,null],[3,"Line","graphics::line","A colored line with a default border radius",null,null],[12,"color","","The line color",9,null],[12,"radius","","The line radius",9,null],[12,"shape","","The line shape",9,null],[4,"Shape","","The shape of the line",null,null],[13,"Square","","Square edges",10,null],[13,"Round","","Round edges",10,null],[13,"Bevel","","Bevel edges",10,null],[11,"clone","","",10,null],[11,"clone","","",9,null],[11,"new","","Creates a new line",9,{"inputs":[{"name":"color"},{"name":"radius"}],"output":{"name":"line"}}],[11,"new_round","","Creates a new line",9,{"inputs":[{"name":"color"},{"name":"radius"}],"output":{"name":"line"}}],[11,"color","","Sets color.",9,null],[11,"radius","","Sets radius.",9,null],[11,"width","","Sets width.",9,null],[11,"shape","","Sets shape.",9,null],[11,"draw","","Draws line using default method.",9,null],[11,"draw_tri","","Draws line using triangulation.",9,null],[11,"draw_arrow","","Draws an arrow",9,null],[0,"circle_arc","graphics","Draw an arc",null,null],[3,"CircleArc","graphics::circle_arc","A curved line",null,null],[12,"color","","The arcs color",11,null],[12,"radius","","The radius of the arc (Thickness of the drawing, not the radius of the circle)",11,null],[12,"start","","The start of the arc in radians",11,null],[12,"end","","The end of the arc in radians",11,null],[12,"resolution","","The resolution for the arc.",11,null],[11,"clone","","",11,null],[11,"new","","Creates a new arc",11,{"inputs":[{"name":"color"},{"name":"radius"},{"name":"scalar"},{"name":"scalar"}],"output":{"name":"circlearc"}}],[11,"color","","Sets the arcs color.",11,null],[11,"radius","","Sets the radius of the arc (Thickness of the arc, not the radius of the circle it wraps)",11,null],[11,"start","","Sets the start of the arc (in radians).",11,null],[11,"end","","Sets the end of the arc (in radians).",11,null],[11,"resolution","","Sets the resolution of the arcs smoothness.",11,null],[11,"draw","","Draws circle arc using default method.",11,null],[11,"draw_tri","","Draws circle arc using triangulation.",11,null],[0,"ellipse","graphics","Draw ellipse",null,null],[3,"Border","graphics::ellipse","Ellipse border",null,null],[12,"color","","The border color",12,null],[12,"radius","","The border radius",12,null],[3,"Ellipse","","An ellipse with filled color",null,null],[12,"color","","The ellipse color",13,null],[12,"border","","The ellipse border",13,null],[12,"resolution","","The resolution for the shape, 360 degrees.",13,null],[11,"clone","","",12,null],[11,"clone","","",13,null],[11,"new","","Creates a new ellipse",13,{"inputs":[{"name":"color"}],"output":{"name":"ellipse"}}],[11,"new_border","","Creates a new ellipse border",13,{"inputs":[{"name":"color"},{"name":"radius"}],"output":{"name":"ellipse"}}],[11,"color","","Sets ellipse color.",13,null],[11,"border","","Sets ellipse border.",13,null],[11,"maybe_border","","Sets optional ellipse border.",13,null],[11,"resolution","","Sets resolution of the ellipse smoothness.",13,null],[11,"draw","","Draws ellipse using default method.",13,null],[11,"draw_tri","","Draws ellipse using triangulation.",13,null],[0,"rectangle","graphics","Draw rectangle",null,null],[3,"Border","graphics::rectangle","The border of the rectangle",null,null],[12,"color","","The color of the border",14,null],[12,"radius","","The radius of the border",14,null],[3,"Rectangle","","A filled rectangle",null,null],[12,"color","","The rectangle color",15,null],[12,"shape","","The roundness of the rectangle",15,null],[12,"border","","The border",15,null],[4,"Shape","","The shape of the rectangle",null,null],[13,"Square","","Square corners",16,null],[13,"Round","","Round corners, with resolution per corner.",16,null],[13,"Bevel","","Bevel corners",16,null],[5,"centered","","Use x, y, half-width, half-height",null,{"inputs":[{"name":"rectangle"}],"output":{"name":"rectangle"}}],[5,"centered_square","","Use centered square",null,{"inputs":[{"name":"scalar"},{"name":"scalar"},{"name":"scalar"}],"output":{"name":"rectangle"}}],[5,"square","","Use square with x, y in upper left corner",null,{"inputs":[{"name":"scalar"},{"name":"scalar"},{"name":"scalar"}],"output":{"name":"rectangle"}}],[11,"clone","","",16,null],[11,"clone","","",14,null],[11,"clone","","",15,null],[11,"new","","Creates a new rectangle.",15,{"inputs":[{"name":"color"}],"output":{"name":"rectangle"}}],[11,"new_round","","Creates a new round rectangle.",15,{"inputs":[{"name":"color"},{"name":"radius"}],"output":{"name":"rectangle"}}],[11,"new_border","","Creates a new rectangle border.",15,{"inputs":[{"name":"color"},{"name":"radius"}],"output":{"name":"rectangle"}}],[11,"new_round_border","","Creates a new round rectangle border.",15,{"inputs":[{"name":"color"},{"name":"radius"},{"name":"radius"}],"output":{"name":"rectangle"}}],[11,"color","","Sets color.",15,null],[11,"shape","","Sets shape.",15,null],[11,"border","","Sets border.",15,null],[11,"maybe_border","","Sets optional border.",15,null],[11,"draw","","Draws the rectangle using default method.",15,null],[11,"draw_tri","","Draws the rectangle using triangulation.",15,null],[0,"image","graphics","Draw an image",null,null],[3,"Image","graphics::image","An image",null,null],[12,"color","","The color",17,null],[12,"rectangle","","The rectangle to draw image inside",17,null],[12,"source_rectangle","","The image source rectangle",17,null],[5,"draw_many","","Draws many images.",null,null],[11,"clone","","",17,null],[11,"new","","Creates a new image",17,{"inputs":[],"output":{"name":"image"}}],[11,"new_color","","Creates a new colored image",17,{"inputs":[{"name":"color"}],"output":{"name":"image"}}],[11,"color","","Sets color.",17,null],[11,"maybe_color","","Sets optional color.",17,null],[11,"rect","","Sets rectangle.",17,null],[11,"maybe_rect","","Sets optional rectangle.",17,null],[11,"src_rect","","Sets source rectangle.",17,null],[11,"maybe_src_rect","","Sets optional source rectangle.",17,null],[11,"draw","","Draws image using default method.",17,null],[11,"draw_tri","","Draws image using triangulation.",17,null],[0,"types","graphics","Contains type aliases used in this library",null,null],[6,"Area","graphics::types","The type used for area.",null,null],[6,"Color","","[red, green, blue, alpha]",null,null],[6,"ColorComponent","","The type used for color component.",null,null],[6,"Line","","[x1, y1, x2, y2]",null,null],[6,"SourceRectangle","","[x, y, w, h]",null,null],[6,"Polygon","","[p0, p1, ...]",null,null],[6,"Polygons","","A slice of polygons.",null,null],[6,"Radius","","The type used for radius.",null,null],[6,"Resolution","","The type used for resolution.",null,null],[6,"Ray","","[x, y, dir_x, dir_y]",null,null],[6,"Rectangle","","[x, y, w, h]",null,null],[6,"Triangle","","[x1, y1, x2, y2, x3, y3]",null,null],[6,"Width","","The type used for width.",null,null],[6,"FontSize","","The type used for font size.",null,null],[0,"modular_index","graphics","Helper functions for computing modular index safely.",null,null],[5,"offset","graphics::modular_index","Computes modular offset safely for indices.",null,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"isize"}],"output":{"name":"usize"}}],[5,"previous","","Computes previous modular index safely.",null,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"usize"}}],[5,"next","","Computes next modular index safely.",null,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"usize"}}],[0,"text","graphics","Draw text",null,null],[3,"Text","graphics::text","Renders text",null,null],[12,"color","","The color",18,null],[12,"font_size","","The font size",18,null],[12,"round","","Whether or not the text's position should be rounded (to a signed distance field).",18,null],[11,"clone","","",18,null],[11,"new","","Creates a new text with black color",18,{"inputs":[{"name":"fontsize"}],"output":{"name":"text"}}],[11,"new_color","","Creates a new colored text",18,{"inputs":[{"name":"color"},{"name":"fontsize"}],"output":{"name":"text"}}],[11,"round","","A builder method indicating that the Text's position should be rounded upon drawing.",18,null],[11,"draw","","Draws text with a character cache",18,null],[0,"triangulation","graphics","Methods for converting shapes into triangles.",null,null],[5,"tx","graphics::triangulation","Transformed x coordinate as f32.",null,{"inputs":[{"name":"matrix2d"},{"name":"scalar"},{"name":"scalar"}],"output":{"name":"f32"}}],[5,"ty","","Transformed y coordinate as f32.",null,{"inputs":[{"name":"matrix2d"},{"name":"scalar"},{"name":"scalar"}],"output":{"name":"f32"}}],[5,"with_lerp_polygons_tri_list","","Streams tweened polygons using linear interpolation.",null,{"inputs":[{"name":"matrix2d"},{"name":"polygons"},{"name":"scalar"},{"name":"f"}],"output":null}],[5,"with_ellipse_tri_list","","Streams an ellipse specified by a resolution.",null,{"inputs":[{"name":"resolution"},{"name":"matrix2d"},{"name":"rectangle"},{"name":"f"}],"output":null}],[5,"with_round_border_line_tri_list","","Streams a round border line.",null,{"inputs":[{"name":"resolution"},{"name":"matrix2d"},{"name":"line"},{"name":"radius"},{"name":"f"}],"output":null}],[5,"with_round_rectangle_tri_list","","Streams a round rectangle.",null,{"inputs":[{"name":"resolution"},{"name":"matrix2d"},{"name":"rectangle"},{"name":"radius"},{"name":"f"}],"output":null}],[5,"stream_polygon_tri_list","","Streams a polygon into tri list.\nUses buffers that fit inside L1 cache.",null,{"inputs":[{"name":"matrix2d"},{"name":"e"},{"name":"f"}],"output":null}],[5,"with_ellipse_border_tri_list","","Streams an ellipse border specified by a resolution.",null,{"inputs":[{"name":"resolution"},{"name":"matrix2d"},{"name":"rectangle"},{"name":"radius"},{"name":"f"}],"output":null}],[5,"with_arc_tri_list","","Streams an arc between the two radian boundaries.",null,{"inputs":[{"name":"scalar"},{"name":"scalar"},{"name":"resolution"},{"name":"matrix2d"},{"name":"rectangle"},{"name":"radius"},{"name":"f"}],"output":null}],[5,"with_round_rectangle_border_tri_list","","Streams a round rectangle border.",null,{"inputs":[{"name":"resolution"},{"name":"matrix2d"},{"name":"rectangle"},{"name":"radius"},{"name":"radius"},{"name":"f"}],"output":null}],[5,"stream_quad_tri_list","","Streams a quad into tri list.",null,{"inputs":[{"name":"matrix2d"},{"name":"e"},{"name":"f"}],"output":null}],[5,"with_polygon_tri_list","","Splits polygon into convex segments.\nCreate a buffer that fits into L1 cache with 1KB overhead.",null,{"inputs":[{"name":"matrix2d"},{"name":"polygon"},{"name":"f"}],"output":null}],[5,"rect_tri_list_xy","","Creates triangle list vertices from rectangle.",null,null],[5,"rect_border_tri_list_xy","","Creates triangle list vertices from rectangle.",null,null],[5,"rect_tri_list_uv","","Creates triangle list texture coords from image.",null,null],[0,"math","graphics","Various methods for computing with vectors.",null,null],[5,"multiply","graphics::math","Multiplies two matrices.",null,null],[5,"dot","","Computes the dot product.",null,null],[5,"cross","","Computes the cross product.",null,null],[5,"add","","Adds two vectors.",null,null],[5,"sub","","Subtracts 'b' from 'a'.",null,null],[5,"cast","","Converts to another vector type.",null,null],[5,"mul","","Multiplies two vectors component wise.",null,null],[5,"mul_scalar","","Multiplies the vector with a scalar.",null,null],[5,"square_len","","Computes the square length of a vector.",null,null],[5,"transform_pos","","Transforms a 2D position through matrix.",null,null],[5,"transform_vec","","Transforms a 2D vector through matrix.",null,null],[5,"perp","","Creates a perpendicular vector.",null,null],[5,"abs_transform","","Transforms from normalized to absolute coordinates.",null,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"matrix2d"}}],[5,"translate","","Creates a translation matrix.",null,{"inputs":[{"name":"vec2d"}],"output":{"name":"matrix2d"}}],[5,"rotate_radians","","Creates a rotation matrix.",null,{"inputs":[{"name":"t"}],"output":{"name":"matrix2d"}}],[5,"orient","","Orients x axis to look at point.",null,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"matrix2d"}}],[5,"scale","","Create a scale matrix.",null,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"matrix2d"}}],[5,"shear","","Create a shear matrix.",null,{"inputs":[{"name":"vec2d"}],"output":{"name":"matrix2d"}}],[5,"identity","","Create an identity matrix.",null,{"inputs":[],"output":{"name":"matrix2d"}}],[5,"get_scale","","Extract scale information from matrix.",null,{"inputs":[{"name":"matrix2d"}],"output":{"name":"vec2d"}}],[5,"separation","","Compute the shortest vector from point to ray.\nA ray stores starting point and directional vector.",null,{"inputs":[{"name":"ray"},{"name":"vec2d"}],"output":{"name":"vec2d"}}],[5,"least_separation_4","","Returns the least separation out of four.\nEach seperation can be computed using `separation` function.\nThe separation returned can be used\nto solve collision of rectangles.",null,{"inputs":[{"name":"vec2d"},{"name":"vec2d"},{"name":"vec2d"},{"name":"vec2d"}],"output":{"name":"vec2d"}}],[5,"margin_rectangle","","Shrinks a rectangle by a factor on all sides.",null,{"inputs":[{"name":"rectangle"},{"name":"t"}],"output":{"name":"rectangle"}}],[5,"relative_rectangle","","Computes a relative rectangle using the rectangle as a tile.",null,{"inputs":[{"name":"rectangle"},{"name":"vec2d"}],"output":{"name":"rectangle"}}],[5,"overlap_rectangle","","Computes overlap between two rectangles.\nThe area of the overlapping rectangle is positive.\nA shared edge or corner is not considered overlap.",null,{"inputs":[{"name":"rectangle"},{"name":"rectangle"}],"output":{"name":"option"}}],[5,"relative_source_rectangle","","Computes a relative source rectangle using\nthe source rectangle as a tile.",null,{"inputs":[{"name":"sourcerectangle"},{"name":"i32"},{"name":"i32"}],"output":{"name":"sourcerectangle"}}],[5,"modular_offset","","Computes modular offset safely for numbers.",null,{"inputs":[{"name":"t"},{"name":"t"},{"name":"t"}],"output":{"name":"t"}}],[5,"area_centroid","","Computes the area and centroid of a simple polygon.",null,null],[5,"area","","Computes area of a simple polygon.",null,{"inputs":[{"name":"polygon"}],"output":{"name":"t"}}],[5,"centroid","","Computes centroid of a simple polygon.",null,{"inputs":[{"name":"polygon"}],"output":{"name":"vec2d"}}],[5,"line_side","","Returns a number that tells which side it is relative to a line.",null,{"inputs":[{"name":"line"},{"name":"vec2d"}],"output":{"name":"t"}}],[5,"inside_triangle","","Returns true if point is inside triangle.",null,{"inputs":[{"name":"triangle"},{"name":"vec2d"}],"output":{"name":"bool"}}],[5,"triangle_face","","Returns true if triangle is clockwise.",null,{"inputs":[{"name":"triangle"}],"output":{"name":"bool"}}],[5,"to_barycentric","","Transforms from cartesian coordinates to barycentric.",null,{"inputs":[{"name":"triangle"},{"name":"vec2d"}],"output":{"name":"vec3d"}}],[5,"from_barycentric","","Transforms from barycentric coordinates to cartesian.",null,{"inputs":[{"name":"triangle"},{"name":"vec3d"}],"output":{"name":"vec2d"}}],[5,"hsv","","Transform color with hue, saturation and value.",null,{"inputs":[{"name":"color"},{"name":"f32"},{"name":"f32"},{"name":"f32"}],"output":{"name":"color"}}],[6,"Scalar","","The type used for scalars.",null,null],[6,"Matrix2d","","The type used for matrices.",null,null],[6,"Vec2d","","The type used for 2D vectors.",null,null],[6,"Vec3d","","The type used for 3D vectors.",null,null],[0,"deform","graphics","Least square deforming of a 2D grid.",null,null],[3,"DeformGrid","graphics::deform","Represents a deformed grid.",null,null],[12,"cols","","The number of columns in the grid.",19,null],[12,"rows","","The number of rows in the grid.",19,null],[12,"rect","","The grid undeformed, which is a plain rectangle.",19,null],[12,"vertices","","The vertices, deformed.",19,null],[12,"indices","","The triangle indices.",19,null],[12,"texture_coords","","The texture coordinates.",19,null],[12,"ps","","Initial position of control points.",19,null],[12,"qs","","The current position of control points.",19,null],[12,"wis","","A weight computation buffer, one for each control point.",19,null],[11,"clone","","",19,null],[11,"new","","Creates a new DeformGrid.",19,{"inputs":[{"name":"rectangle"},{"name":"usize"},{"name":"usize"}],"output":{"name":"deformgrid"}}],[11,"set_current","","Sets current control position.",19,null],[11,"set_original","","Sets original control position.",19,null],[11,"reset_control_points","","Removes all control points.",19,null],[11,"reset_vertices_and_texture_coords","","Sets vertices and texture coords back to default.",19,null],[11,"hit","","Finds original coordinate.\nIf the deformed grid is overlapping itself, multiple hits might occur.\nReturns the first hit it finds.",19,null],[11,"draw_image","","Draws deformed image using default method.",19,null],[11,"draw_image_tri","","Draws deformed image using triangulation.",19,null],[11,"add_control_point","","Adds a control point, in original coordinates.",19,null],[11,"draw_vertical_lines","","Draw vertical grid lines.",19,null],[11,"draw_horizontal_lines","","Draw horizontal grid lines.",19,null],[11,"update","","Updates the grid, by deforming the vertices.",19,null],[0,"grid","graphics","A flat grid with square cells.",null,null],[3,"Grid","graphics::grid","Represents a flat grid with square cells.",null,null],[12,"cols","","Number of columns.",20,null],[12,"rows","","Number of rows.",20,null],[12,"units","","The width and height of each grid cell.",20,null],[3,"GridCells","","Iterates through the cells of a grid as (u32, u32).",null,null],[11,"clone","","",20,null],[11,"clone","","",21,null],[11,"draw","","Draws the grid.",20,null],[11,"cells","","Get a GridIterator for the grid",20,null],[11,"cell_position","","Get on-screen position of a grid cell",20,null],[11,"x_pos","","Get on-screen x position of a grid cell",20,null],[11,"y_pos","","Get on-screen y position of a grid cell",20,null],[11,"next","","",21,null],[0,"radians","graphics","Reexport radians helper trait from vecmath",null,null],[8,"Radians","graphics::radians","Useful constants for radians.",null,null],[10,"_90","","Returns radians corresponding to 90 degrees.",22,{"inputs":[],"output":{"name":"self"}}],[10,"_180","","Returns radians corresponding to 180 degrees.",22,{"inputs":[],"output":{"name":"self"}}],[10,"_360","","Returns radians corresponding to 360 degrees.",22,{"inputs":[],"output":{"name":"self"}}],[10,"deg_to_rad","","Convert a value to radians from degrees.\nEquivalent to ```value * (π / 180)```.",22,null],[10,"rad_to_deg","","Convert a value to degrees from radians.\nEquivalent to ```value * (180 / π)```.",22,null],[7,"BACK_END_MAX_VERTEX_COUNT","graphics","Any triangulation method called on the back-end\nnever exceeds this number of vertices.\nThis can be used to initialize buffers that fit the chunk size.",null,null],[8,"Graphics","","Implemented by all graphics back-ends.",null,null],[16,"Texture","","The texture type associated with the back-end.",23,null],[10,"clear_color","","Clears background with a color.",23,null],[10,"clear_stencil","","Clears stencil buffer with a value, usually 0.",23,null],[10,"tri_list","","Renders list of 2d triangles using a solid color.",23,null],[10,"tri_list_uv","","Renders list of 2d triangles using a color and a texture.",23,null],[11,"rectangle","","Draws a rectangle.",23,null],[11,"polygon","","Draws a polygon.",23,null],[11,"polygon_tween_lerp","","Draws a tweened polygon using linear interpolation.",23,null],[11,"image","","Draws image.",23,null],[11,"ellipse","","Draws ellipse.",23,null],[11,"line","","Draws line.",23,null],[11,"circle_arc","","Draws circle arc.",23,null],[11,"deform_image","","Draws deformed image.",23,null],[8,"SourceRectangled","","Should be implemented by contexts that\nhave source rectangle information.",null,null],[10,"src_rect","","Adds a source rectangle.",24,null],[10,"src_rel","","Moves to a relative source rectangle using\nthe current source rectangle as tile.",24,null],[10,"src_flip_h","","Flips the source rectangle horizontally.",24,null],[10,"src_flip_v","","Flips the source rectangle vertically.",24,null],[10,"src_flip_hv","","Flips the source rectangle horizontally and vertically.",24,null],[8,"Rectangled","","Should be implemented by contexts that have rectangle information.",null,null],[10,"margin","","Shrinks the current rectangle equally by all sides.",25,null],[11,"expand","","Expands the current rectangle equally by all sides.",25,null],[10,"rel","","Moves to a relative rectangle using the current rectangle as tile.",25,null],[8,"Transformed","","Implemented by contexts that can transform.",null,null],[10,"append_transform","","Appends transform to the current one.",26,null],[10,"prepend_transform","","Prepends transform to the current one.",26,null],[10,"trans","","Translate x an y in local coordinates.",26,null],[11,"rot_deg","","Rotates degrees in local coordinates.",26,null],[10,"rot_rad","","Rotate radians in local coordinates.",26,null],[10,"orient","","Orients x axis to look at point locally.",26,null],[10,"scale","","Scales in local coordinates.",26,null],[11,"zoom","","Scales in both directions in local coordinates.",26,null],[11,"flip_v","","Flips vertically in local coordinates.",26,null],[11,"flip_h","","Flips horizontally in local coordinates.",26,null],[11,"flip_hv","","Flips horizontally and vertically in local coordinates.",26,null],[10,"shear","","Shears in local coordinates.",26,null],[8,"Colored","","Implemented by contexts that contains color.",null,null],[10,"mul_rgba","","Multiplies with red, green, blue and alpha values.",27,null],[11,"tint","","Mixes the current color with white.",27,null],[11,"shade","","Mixes the current color with black.",27,null],[11,"hue_deg","","Rotates hue by degrees.",27,null],[10,"hue_rad","","Rotates hue by radians.",27,null],[11,"abs_transform","","Computes absolute transform for 2D graphics,\nwhich uses a row major 2x3 matrix.\nThe origin is in the upper left corner of the viewport rectangle.\nThe x axis points to the right, and the y axis points down.\nThe units are in points (window coordinates).",1,null],[11,"clone","","",1,null],[11,"rectangle","","Draws a rectangle.",23,null],[11,"polygon","","Draws a polygon.",23,null],[11,"polygon_tween_lerp","","Draws a tweened polygon using linear interpolation.",23,null],[11,"image","","Draws image.",23,null],[11,"ellipse","","Draws ellipse.",23,null],[11,"line","","Draws line.",23,null],[11,"circle_arc","","Draws circle arc.",23,null],[11,"deform_image","","Draws deformed image.",23,null],[11,"src_rect","graphics::types","",28,null],[11,"src_rel","","",28,null],[11,"src_flip_h","","",28,null],[11,"src_flip_v","","",28,null],[11,"src_flip_hv","","",28,null],[11,"expand","graphics","Expands the current rectangle equally by all sides.",25,null],[11,"margin","graphics::types","",29,null],[11,"rel","","",29,null],[11,"rot_deg","graphics","Rotates degrees in local coordinates.",26,null],[11,"zoom","","Scales in both directions in local coordinates.",26,null],[11,"flip_v","","Flips vertically in local coordinates.",26,null],[11,"flip_h","","Flips horizontally in local coordinates.",26,null],[11,"flip_hv","","Flips horizontally and vertically in local coordinates.",26,null],[11,"append_transform","graphics::math","",30,null],[11,"prepend_transform","","",30,null],[11,"trans","","",30,null],[11,"rot_rad","","",30,null],[11,"orient","","",30,null],[11,"scale","","",30,null],[11,"shear","","",30,null],[11,"append_transform","graphics::context","",7,null],[11,"prepend_transform","","",7,null],[11,"trans","","",7,null],[11,"rot_rad","","",7,null],[11,"orient","","",7,null],[11,"scale","","",7,null],[11,"shear","","",7,null],[11,"tint","graphics","Mixes the current color with white.",27,null],[11,"shade","","Mixes the current color with black.",27,null],[11,"hue_deg","","Rotates hue by degrees.",27,null],[11,"mul_rgba","graphics::types","",31,null],[11,"hue_rad","","",31,null],[11,"mul_rgba","graphics::line","",9,null],[11,"hue_rad","","",9,null],[11,"mul_rgba","graphics::ellipse","",13,null],[11,"hue_rad","","",13,null],[11,"mul_rgba","graphics::rectangle","",15,null],[11,"hue_rad","","",15,null]],"paths":[[8,"ImageSize"],[3,"Viewport"],[3,"DrawState"],[4,"Blend"],[4,"Stencil"],[3,"Character"],[8,"CharacterCache"],[3,"Context"],[3,"Polygon"],[3,"Line"],[4,"Shape"],[3,"CircleArc"],[3,"Border"],[3,"Ellipse"],[3,"Border"],[3,"Rectangle"],[4,"Shape"],[3,"Image"],[3,"Text"],[3,"DeformGrid"],[3,"Grid"],[3,"GridCells"],[8,"Radians"],[8,"Graphics"],[8,"SourceRectangled"],[8,"Rectangled"],[8,"Transformed"],[8,"Colored"],[6,"SourceRectangle"],[6,"Rectangle"],[6,"Matrix2d"],[6,"Color"]]}; initSearch(searchIndex);