_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c30800
train
// NewBatch creates an empty Batch with the specified Picture and container. // // The container is where objects get accumulated. Batch will support precisely those Triangles // properties, that the supplied container supports. If you retain access to the container and // change it, call Dirty to notify Batch about th...
{ "resource": "" }
c30801
train
// Clear removes all objects from the Batch.
{ "resource": "" }
c30802
train
// SetColorMask sets a mask color used in the following draws onto the Batch.
{ "resource": "" }
c30803
train
// MakeTriangles returns a specialized copy of the provided Triangles that draws onto this Batch.
{ "resource": "" }
c30804
train
// MakePicture returns a specialized copy of the provided Picture that draws onto this Batch.
{ "resource": "" }
c30805
train
// Dirty marks the Triangles of this Drawer as changed. If not called, changes will not be visible // when drawing.
{ "resource": "" }
c30806
train
// Draw efficiently draws Triangles with Picture onto the provided Target. // // If Triangles is nil, nothing will be drawn. If Picture is nil, Triangles will be drawn without a // Picture.
{ "resource": "" }
c30807
train
// NewGLFrame creates a new GLFrame with the given bounds.
{ "resource": "" }
c30808
train
// SetBounds resizes the GLFrame to the new bounds.
{ "resource": "" }
c30809
train
// Color returns the color of the pixel under the specified position.
{ "resource": "" }
c30810
train
// NewGLTriangles returns GLTriangles initialized with the data from the supplied Triangles. // // Only draw the Triangles using the provided Shader.
{ "resource": "" }
c30811
train
// Len returns the number of vertices.
{ "resource": "" }
c30812
train
// Slice returns a sub-Triangles of this GLTriangles in range [i, j).
{ "resource": "" }
c30813
train
// Position returns the Position property of the i-th vertex.
{ "resource": "" }
c30814
train
// Color returns the Color property of the i-th vertex.
{ "resource": "" }
c30815
train
// Picture returns the Picture property of the i-th vertex.
{ "resource": "" }
c30816
train
// RGB returns a fully opaque RGBA color with the given RGB values. // // A common way to construct a transparent color is to create one with RGB constructor, then // multiply it by a color obtained from the Alpha constructor.
{ "resource": "" }
c30817
train
// RGBA returns alpha-premultiplied red, green, blue and alpha components of the RGBA color.
{ "resource": "" }
c30818
train
// Monitors returns a slice of all currently available monitors.
{ "resource": "" }
c30819
train
// Name returns a human-readable name of the Monitor.
{ "resource": "" }
c30820
train
// PhysicalSize returns the size of the display area of the Monitor in millimeters.
{ "resource": "" }
c30821
train
// Position returns the position of the upper-left corner of the Monitor in screen coordinates.
{ "resource": "" }
c30822
train
// Size returns the resolution of the Monitor in pixels.
{ "resource": "" }
c30823
train
// BitDepth returns the number of bits per color of the Monitor.
{ "resource": "" }
c30824
train
// VideoModes returns all available video modes for the monitor.
{ "resource": "" }
c30825
train
// nearlyEqual compares two float64s and returns whether they are equal, accounting for rounding errors.At worst, the // result is correct to 7 significant digits.
{ "resource": "" }
c30826
train
// Eq will compare two vectors and return whether they are equal accounting for rounding errors. At worst, the result // is correct to 7 significant digits.
{ "resource": "" }
c30827
train
// XY returns the components of the vector in two return values.
{ "resource": "" }
c30828
train
// Add returns the sum of vectors u and v.
{ "resource": "" }
c30829
train
// Sub returns the difference betweeen vectors u and v.
{ "resource": "" }
c30830
train
// Floor converts x and y to their integer equivalents.
{ "resource": "" }
c30831
train
// Scaled returns the vector u multiplied by c.
{ "resource": "" }
c30832
train
// ScaledXY returns the vector u multiplied by the vector v component-wise.
{ "resource": "" }
c30833
train
// Len returns the length of the vector u.
{ "resource": "" }
c30834
train
// Rotated returns the vector u rotated by the given angle in radians.
{ "resource": "" }
c30835
train
// Dot returns the dot product of vectors u and v.
{ "resource": "" }
c30836
train
// Cross return the cross product of vectors u and v.
{ "resource": "" }
c30837
train
// Lerp returns a linear interpolation between vectors a and b. // // This function basically returns a point along the line between a and b and t chooses which one. // If t is 0, then a will be returned, if t is 1, b will be returned. Anything between 0 and 1 will // return the appropriate point between a and b and so...
{ "resource": "" }
c30838
train
// L creates and returns a new Line.
{ "resource": "" }
c30839
train
// Bounds returns the lines bounding box. This is in the form of a normalized Rect.
{ "resource": "" }
c30840
train
// Center will return the point at center of the line; that is, the point equidistant from either end.
{ "resource": "" }
c30841
train
// Closest will return the point on the line which is closest to the Vec provided.
{ "resource": "" }
c30842
train
// Contains returns whether the provided Vec lies on the line.
{ "resource": "" }
c30843
train
// Intersect will return the point of intersection for the two line segments. If the line segments do not intersect, // this function will return the zero-vector and false.
{ "resource": "" }
c30844
train
// IntersectCircle will return the shortest Vec such that moving the Line by that Vec will cause the Line and Circle // to no longer intesect. If they do not intersect at all, this function will return a zero-vector.
{ "resource": "" }
c30845
train
// IntersectRect will return the shortest Vec such that moving the Line by that Vec will cause the Line and Rect to // no longer intesect. If they do not intersect at all, this function will return a zero-vector.
{ "resource": "" }
c30846
train
// Len returns the length of the line segment.
{ "resource": "" }
c30847
train
// Moved will return a line moved by the delta Vec provided.
{ "resource": "" }
c30848
train
// Rotated will rotate the line around the provided Vec.
{ "resource": "" }
c30849
train
// Scaled will return the line scaled around the center point.
{ "resource": "" }
c30850
train
// ScaledXY will return the line scaled around the Vec provided.
{ "resource": "" }
c30851
train
// R returns a new Rect with given the Min and Max coordinates. // // Note that the returned rectangle is not automatically normalized.
{ "resource": "" }
c30852
train
// Norm returns the Rect in normal form, such that Max is component-wise greater or equal than Min.
{ "resource": "" }
c30853
train
// W returns the width of the Rect.
{ "resource": "" }
c30854
train
// H returns the height of the Rect.
{ "resource": "" }
c30855
train
// Edges will return the four lines which make up the edges of the rectangle.
{ "resource": "" }
c30856
train
// ResizedMin returns the Rect resized to the given size while keeping the position of the Rect's // Min. // // Sizes of zero area are safe here.
{ "resource": "" }
c30857
train
// Union returns the minimal Rect which covers both r and s. Rects r and s must be normalized.
{ "resource": "" }
c30858
train
// IntersectionPoints returns all the points where the Rect intersects with the line provided. This can be zero, one or // two points, depending on the location of the shapes. The points of intersection will be returned in order of // closest-to-l.A to closest-to-l.B.
{ "resource": "" }
c30859
train
// Vertices returns a slice of the four corners which make up the rectangle.
{ "resource": "" }
c30860
train
// C returns a new Circle with the given radius and center coordinates. // // Note that a negative radius is valid.
{ "resource": "" }
c30861
train
// Area returns the area of the Circle.
{ "resource": "" }
c30862
train
// Moved returns the Circle moved by the given vector delta.
{ "resource": "" }
c30863
train
// maxCircle will return the larger circle based on the radius.
{ "resource": "" }
c30864
train
// minCircle will return the smaller circle based on the radius.
{ "resource": "" }
c30865
train
// Union returns the minimal Circle which covers both `c` and `d`.
{ "resource": "" }
c30866
train
// Intersect returns the maximal Circle which is covered by both `c` and `d`. // // If `c` and `d` don't overlap, this function returns a zero-sized circle at the centerpoint between the two Circle's // centers.
{ "resource": "" }
c30867
train
// Moved moves everything by the delta vector.
{ "resource": "" }
c30868
train
// ScaledXY scales everything around a given point by the scale factor in each axis respectively.
{ "resource": "" }
c30869
train
// Scaled scales everything around a given point by the scale factor.
{ "resource": "" }
c30870
train
// Rotated rotates everything around a given point by the given angle in radians.
{ "resource": "" }
c30871
train
// Chained adds another Matrix to this one. All tranformations by the next Matrix will be applied // after the transformations of this Matrix.
{ "resource": "" }
c30872
train
// BoundsOf returns the bounding box of s if it was to be written to the Text right now.
{ "resource": "" }
c30873
train
// Clear removes all written text from the Text. The Dot field is reset to Orig.
{ "resource": "" }
c30874
train
// WriteByte writes a byte to the Text. This method never fails, always returns nil. // // Writing a multi-byte rune byte-by-byte is perfectly supported.
{ "resource": "" }
c30875
train
// Draw draws all text written to the Text to the provided Target. The text is transformed by the // provided Matrix. // // This method is equivalent to calling DrawColorMask with nil color mask. // // If there's a lot of text written to the Text, changing a matrix or a color mask often might hurt // performance. Consi...
{ "resource": "" }
c30876
train
// DrawColorMask draws all text written to the Text to the provided Target. The text is transformed // by the provided Matrix and masked by the provided color mask. // // If there's a lot of text written to the Text, changing a matrix or a color mask often might hurt // performance. Consider using your Target's SetMatr...
{ "resource": "" }
c30877
train
// Slice returns a sub-Triangles of this TrianglesData.
{ "resource": "" }
c30878
train
// Update copies vertex properties from the supplied Triangles into this TrianglesData. // // TrianglesPosition, TrianglesColor and TrianglesTexture are supported.
{ "resource": "" }
c30879
train
// Copy returns an exact independent copy of this TrianglesData.
{ "resource": "" }
c30880
train
// Picture returns the picture property of i-th vertex.
{ "resource": "" }
c30881
train
// MakePictureData creates a zero-initialized PictureData covering the given rectangle.
{ "resource": "" }
c30882
train
// PictureDataFromImage converts an image.Image into PictureData. // // The resulting PictureData's Bounds will be the equivalent of the supplied image.Image's Bounds.
{ "resource": "" }
c30883
train
// Image converts PictureData into an image.RGBA. // // The resulting image.RGBA's Bounds will be equivalent of the PictureData's Bounds.
{ "resource": "" }
c30884
train
// Index returns the index of the pixel at the specified position inside the Pix slice.
{ "resource": "" }
c30885
train
// Color returns the color located at the given position.
{ "resource": "" }
c30886
train
// ToJSON encodes the schema in a JSON format used by tools like Relay.
{ "resource": "" }
c30887
train
// MustParseSchema calls ParseSchema and panics on error.
{ "resource": "" }
c30888
train
// Tracer is used to trace queries and fields. It defaults to trace.OpenTracingTracer.
{ "resource": "" }
c30889
train
// ValidationTracer is used to trace validation errors. It defaults to trace.NoopValidationTracer.
{ "resource": "" }
c30890
train
// Logger is used to log panics during query execution. It defaults to exec.DefaultLogger.
{ "resource": "" }
c30891
train
// Validate validates the given query with the schema.
{ "resource": "" }
c30892
train
// UnmarshalGraphQL is a custom unmarshaler for Time // // This function will be called whenever you use the // time scalar as an input
{ "resource": "" }
c30893
train
// Resolve a named type in the schema by its name.
{ "resource": "" }
c30894
train
// Get iterates over the field list, returning a pointer-to-Field when the field name matches the // provided `name` argument. // Returns nil when no field was found by that name.
{ "resource": "" }
c30895
train
// Names returns a string slice of the field names in the FieldList.
{ "resource": "" }
c30896
train
// New initializes an instance of Schema.
{ "resource": "" }
c30897
train
// LogPanic is used to log recovered panic values that occur during query execution
{ "resource": "" }
c30898
train
// Validate loads and validates a JSON schema
{ "resource": "" }
c30899
train
// Validate loads and validates a JSON document
{ "resource": "" }