_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c30700
train
// SetFillStyle sets current fill style
{ "resource": "" }
c30701
train
// SetRGBA255 sets the current color. r, g, b, a values should be between 0 and // 255, inclusive.
{ "resource": "" }
c30702
train
// SetRGBA sets the current color. r, g, b, a values should be between 0 and 1, // inclusive.
{ "resource": "" }
c30703
train
// Path Manipulation // MoveTo starts a new subpath within the current path starting at the // specified point.
{ "resource": "" }
c30704
train
// ClosePath adds a line segment from the current point to the beginning // of the current subpath. If there is no current point, this is a no-op.
{ "resource": "" }
c30705
train
// ClearPath clears the current path. There is no current point after this // operation.
{ "resource": "" }
c30706
train
// NewSubPath starts a new subpath within the current path. There is no current // point after this operation.
{ "resource": "" }
c30707
train
// StrokePreserve strokes the current path with the current color, line width, // line cap, line join and dash settings. The path is preserved after this // operation.
{ "resource": "" }
c30708
train
// FillPreserve fills the current path with the current color. Open subpaths // are implicity closed. The path is preserved after this operation.
{ "resource": "" }
c30709
train
// InvertMask inverts the alpha values in the current clipping mask such that // a fully transparent region becomes fully opaque and vice versa.
{ "resource": "" }
c30710
train
// Convenient Drawing Functions // Clear fills the entire image with the current color.
{ "resource": "" }
c30711
train
// SetPixel sets the color of the specified pixel using the current color.
{ "resource": "" }
c30712
train
// DrawPoint is like DrawCircle but ensures that a circle of the specified // size is drawn regardless of the current transformation matrix. The position // is still transformed, but not the shape of the point.
{ "resource": "" }
c30713
train
// DrawImage draws the specified image at the specified point.
{ "resource": "" }
c30714
train
// DrawString draws the specified text at the specified point.
{ "resource": "" }
c30715
train
// DrawStringWrapped word-wraps the specified string to the given max width // and then draws it at the specified anchor point using the given line // spacing and text alignment.
{ "resource": "" }
c30716
train
// MeasureString returns the rendered width and height of the specified text // given the current font face.
{ "resource": "" }
c30717
train
// WordWrap wraps the specified string to the given max width and current // font face.
{ "resource": "" }
c30718
train
// Translate updates the current matrix with a translation.
{ "resource": "" }
c30719
train
// Scale updates the current matrix with a scaling factor. // Scaling occurs about the origin.
{ "resource": "" }
c30720
train
// ScaleAbout updates the current matrix with a scaling factor. // Scaling occurs about the specified point.
{ "resource": "" }
c30721
train
// Rotate updates the current matrix with a clockwise rotation. // Rotation occurs about the origin. Angle is specified in radians.
{ "resource": "" }
c30722
train
// RotateAbout updates the current matrix with a clockwise rotation. // Rotation occurs about the specified point. Angle is specified in radians.
{ "resource": "" }
c30723
train
// Shear updates the current matrix with a shearing angle. // Shearing occurs about the origin.
{ "resource": "" }
c30724
train
// ShearAbout updates the current matrix with a shearing angle. // Shearing occurs about the specified point.
{ "resource": "" }
c30725
train
// TransformPoint multiplies the specified point by the current matrix, // returning a transformed position.
{ "resource": "" }
c30726
train
// InvertY flips the Y axis so that Y grows from bottom to top and Y=0 is at // the bottom of the image.
{ "resource": "" }
c30727
train
// Stack // Push saves the current state of the context for later retrieval. These // can be nested.
{ "resource": "" }
c30728
train
// Pop restores the last saved context state from the stack.
{ "resource": "" }
c30729
train
// New creates a new empty IMDraw. An optional Picture can be used to draw with a Picture. // // If you just want to draw primitive shapes, pass nil as the Picture.
{ "resource": "" }
c30730
train
// Reset restores all point properties to defaults and removes all Pushed points. // // This does not affect matrix and color mask set by SetMatrix and SetColorMask.
{ "resource": "" }
c30731
train
// Draw draws all currently drawn shapes inside the IM onto another Target. // // Note, that IMDraw's matrix and color mask have no effect here.
{ "resource": "" }
c30732
train
// Push adds some points to the IM queue. All Pushed points will have the same properties except for // the position.
{ "resource": "" }
c30733
train
// SetMatrix sets a Matrix that all further points will be transformed by.
{ "resource": "" }
c30734
train
// SetColorMask sets a color that all further point's color will be multiplied by.
{ "resource": "" }
c30735
train
// MakeTriangles returns a specialized copy of the provided Triangles that draws onto this IMDraw.
{ "resource": "" }
c30736
train
// MakePicture returns a specialized copy of the provided Picture that draws onto this IMDraw.
{ "resource": "" }
c30737
train
// Rectangle draws a rectangle between each two subsequent Pushed points. Drawing a rectangle // between two points means drawing a rectangle with sides parallel to the axes of the coordinate // system, where the two points specify it's two opposite corners. // // If the thickness is 0, rectangles will be filled, other...
{ "resource": "" }
c30738
train
// Polygon draws a polygon from the Pushed points. If the thickness is 0, the convex polygon will be // filled. Otherwise, an outline of the specified thickness will be drawn. The outline does not have // to be convex. // // Note, that the filled polygon does not have to be strictly convex. The way it's drawn is that a...
{ "resource": "" }
c30739
train
// Circle draws a circle of the specified radius around each Pushed point. If the thickness is 0, // the circle will be filled, otherwise a circle outline of the specified thickness will be drawn.
{ "resource": "" }
c30740
train
// Ellipse draws an ellipse of the specified radius in each axis around each Pushed points. If the // thickness is 0, the ellipse will be filled, otherwise an ellipse outline of the specified // thickness will be drawn.
{ "resource": "" }
c30741
train
// Pressed returns whether the Button is currently pressed down.
{ "resource": "" }
c30742
train
// JustPressed returns whether the Button has just been pressed down.
{ "resource": "" }
c30743
train
// Repeated returns whether a repeat event has been triggered on button. // // Repeat event occurs repeatedly when a button is held down for some time.
{ "resource": "" }
c30744
train
// SetMousePosition positions the mouse cursor anywhere within the Window's Bounds.
{ "resource": "" }
c30745
train
// String returns a human-readable string describing the Button.
{ "resource": "" }
c30746
train
// UpdateInput polls window events. Call this function to poll window events // without swapping buffers. Note that the Update method invokes UpdateInput.
{ "resource": "" }
c30747
train
// reinitialize GLShader data and recompile the underlying gl shader object
{ "resource": "" }
c30748
train
// gets the uniform index from GLShader
{ "resource": "" }
c30749
train
// Sets up a base shader with everything needed for a Pixel // canvas to render correctly. The defaults can be overridden // by simply using the SetUniform function.
{ "resource": "" }
c30750
train
// Value returns the attribute's concrete value. If the stored value // is a pointer, we return the dereferenced value.
{ "resource": "" }
c30751
train
// Update swaps buffers and polls events. Call this method at the end of each frame.
{ "resource": "" }
c30752
train
// SetClosed sets the closed flag of the Window. // // This is useful when overriding the user's attempt to close the Window, or just to close the // Window from within the program.
{ "resource": "" }
c30753
train
// Closed returns the closed flag of the Window, which reports whether the Window should be closed. // // The closed flag is automatically set when a user attempts to close the Window.
{ "resource": "" }
c30754
train
// SetTitle changes the title of the Window.
{ "resource": "" }
c30755
train
// SetBounds sets the bounds of the Window in pixels. Bounds can be fractional, but the actual size // of the window will be rounded to integers.
{ "resource": "" }
c30756
train
// SetPos sets the position, in screen coordinates, of the upper-left corner // of the client area of the window. Position can be fractional, but the actual position // of the window will be rounded to integers. // // If it is a full screen window, this function does nothing.
{ "resource": "" }
c30757
train
// GetPos gets the position, in screen coordinates, of the upper-left corner // of the client area of the window. The position is rounded to integers.
{ "resource": "" }
c30758
train
// SetMonitor sets the Window fullscreen on the given Monitor. If the Monitor is nil, the Window // will be restored to windowed state instead. // // The Window will be automatically set to the Monitor's resolution. If you want a different // resolution, you will need to set it manually with SetBounds method.
{ "resource": "" }
c30759
train
// Monitor returns a monitor the Window is fullscreen on. If the Window is not fullscreen, this // function returns nil.
{ "resource": "" }
c30760
train
// Focused returns true if the Window has input focus.
{ "resource": "" }
c30761
train
// SetCursorVisible sets the visibility of the mouse cursor inside the Window client area.
{ "resource": "" }
c30762
train
// MakeTriangles generates a specialized copy of the supplied Triangles that will draw onto this // Window. // // Window supports TrianglesPosition, TrianglesColor and TrianglesPicture.
{ "resource": "" }
c30763
train
// MakePicture generates a specialized copy of the supplied Picture that will draw onto this Window. // // Window supports PictureColor.
{ "resource": "" }
c30764
train
// SetColorMask sets a global color mask for the Window.
{ "resource": "" }
c30765
train
// SetComposeMethod sets a Porter-Duff composition method to be used in the following draws onto // this Window.
{ "resource": "" }
c30766
train
// Clear clears the Window with a single color.
{ "resource": "" }
c30767
train
// Color returns the color of the pixel over the given position inside the Window.
{ "resource": "" }
c30768
train
// Contains reports wheter r in contained within the Atlas.
{ "resource": "" }
c30769
train
// Kern returns the kerning distance between runes r0 and r1. Positive distance means that the // glyphs should be further apart.
{ "resource": "" }
c30770
train
// DrawRune returns parameters necessary for drawing a rune glyph. // // Rect is a rectangle where the glyph should be positioned. Frame is the glyph frame inside the // Atlas's Picture. NewDot is the new position of the dot.
{ "resource": "" }
c30771
train
// makeSquareMapping finds an optimal glyph arrangement of the given runes, so that their common // bounding box is as square as possible.
{ "resource": "" }
c30772
train
// makeMapping arranges glyphs of the given runes into rows in such a way, that no glyph is located // fully to the right of the specified width. Specifically, it places glyphs in a row one by one and // once it reaches the specified width, it starts a new row.
{ "resource": "" }
c30773
train
// NewCanvas creates a new empty, fully transparent Canvas with given bounds.
{ "resource": "" }
c30774
train
// SetUniform will update the named uniform with the value of any supported underlying // attribute variable. If the uniform already exists, including defaults, they will be reassigned // to the new value. The value can be a pointer.
{ "resource": "" }
c30775
train
// SetFragmentShader allows you to set a new fragment shader on the underlying // framebuffer. Argument "src" is the GLSL source, not a filename.
{ "resource": "" }
c30776
train
// MakeTriangles creates a specialized copy of the supplied Triangles that draws onto this Canvas. // // TrianglesPosition, TrianglesColor and TrianglesPicture are supported.
{ "resource": "" }
c30777
train
// MakePicture create a specialized copy of the supplied Picture that draws onto this Canvas. // // PictureColor is supported.
{ "resource": "" }
c30778
train
// SetColorMask sets a color that every color in triangles or a picture will be multiplied by.
{ "resource": "" }
c30779
train
// SetBounds resizes the Canvas to the new bounds. Old content will be preserved.
{ "resource": "" }
c30780
train
// Clear fills the whole Canvas with a single color.
{ "resource": "" }
c30781
train
// Color returns the color of the pixel over the given position inside the Canvas.
{ "resource": "" }
c30782
train
// Pixels returns an alpha-premultiplied RGBA sequence of the content of the Canvas.
{ "resource": "" }
c30783
train
// Draw draws the content of the Canvas onto another Target, transformed by the given Matrix, just // like if it was a Sprite containing the whole Canvas.
{ "resource": "" }
c30784
train
// DrawColorMask draws the content of the Canvas onto another Target, transformed by the given // Matrix and multiplied by the given mask, just like if it was a Sprite containing the whole Canvas. // // If the color mask is nil, a fully opaque white mask will be used causing no effect.
{ "resource": "" }
c30785
train
// JoystickPresent returns if the joystick is currently connected. // // This API is experimental.
{ "resource": "" }
c30786
train
// JoystickName returns the name of the joystick. A disconnected joystick will return an // empty string. // // This API is experimental.
{ "resource": "" }
c30787
train
// JoystickButtonCount returns the number of buttons a connected joystick has. // // This API is experimental.
{ "resource": "" }
c30788
train
// JoystickAxisCount returns the number of axes a connected joystick has. // // This API is experimental.
{ "resource": "" }
c30789
train
// JoystickPressed returns whether the joystick Button is currently pressed down. // If the button index is out of range, this will return false. // // This API is experimental.
{ "resource": "" }
c30790
train
// JoystickJustPressed returns whether the joystick Button has just been pressed down. // If the button index is out of range, this will return false. // // This API is experimental.
{ "resource": "" }
c30791
train
// JoystickAxis returns the value of a joystick axis at the last call to Window.Update. // If the axis index is out of range, this will return 0. // // This API is experimental.
{ "resource": "" }
c30792
train
// Used internally during Window.UpdateInput to update the state of the joysticks.
{ "resource": "" }
c30793
train
// Returns if a button on a joystick is down, returning false if the button or joystick is invalid.
{ "resource": "" }
c30794
train
// Returns the value of a joystick axis, returning 0 if the button or joystick is invalid.
{ "resource": "" }
c30795
train
// NewSprite creates a Sprite from the supplied frame of a Picture.
{ "resource": "" }
c30796
train
// Set sets a new frame of a Picture for this Sprite.
{ "resource": "" }
c30797
train
// Draw draws the Sprite onto the provided Target. The Sprite will be transformed by the given Matrix. // // This method is equivalent to calling DrawColorMask with nil color mask.
{ "resource": "" }
c30798
train
// DrawColorMask draws the Sprite onto the provided Target. The Sprite will be transformed by the // given Matrix and all of it's color will be multiplied by the given mask. // // If the mask is nil, a fully opaque white mask will be used, which causes no effect.
{ "resource": "" }
c30799
train
// Compose composes two colors together according to the ComposeMethod. A is the foreground, B is // the background.
{ "resource": "" }