Skip to content
15 changes: 15 additions & 0 deletions coresdk/src/coresdk/clipping.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ namespace splashkit_lib
* @param wnd The window to add clipping to
* @param r The new clipping rectangle
*
* @attribute class window
* @attribute suffix for_window
* @attribute method push_clip
* @attribute self wnd
*/
void push_clip(window wnd, const rectangle &r);

Expand All @@ -64,7 +67,10 @@ namespace splashkit_lib
*
* @param wnd The window to clear the clipping rectangle
*
* @attribute class window
* @attribute suffix for_window
* @attribute method reset_clip
* @attribute self wnd
*/
void reset_clip(window wnd);

Expand Down Expand Up @@ -98,7 +104,10 @@ namespace splashkit_lib
* @param wnd The window to change
* @param r The new clipping rectangle
*
* @attribute class window
* @attribute suffix for_window
* @attribute method set_clip
* @attribute self wnd
*/
void set_clip(window wnd, const rectangle &r);

Expand Down Expand Up @@ -133,7 +142,10 @@ namespace splashkit_lib
*
* @param wnd The window to change
*
* @attribute class window
* @attribute suffix for_window
* @attribute method pop_clip
* @attribute self wnd
*/
void pop_clip(window wnd);

Expand All @@ -153,7 +165,10 @@ namespace splashkit_lib
* @param wnd The window to get the clipping rectangle from
* @return The current clipping rectangle for the window
*
* @attribute class window
* @attribute suffix for_window
* @attribute method current_clip
* @attribute self wnd
*/
rectangle current_clip(window wnd);

Expand Down
6 changes: 6 additions & 0 deletions coresdk/src/coresdk/drawing_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ namespace splashkit_lib
* @param dest The window to draw onto.
* @return A drawing option that will draw to the indicated window.
*
* @attribute class window
* @attribute suffix window
* @attribute method option_draw_to
* @attribute self dest
*/
drawing_options option_draw_to(window dest);

Expand All @@ -63,7 +66,10 @@ namespace splashkit_lib
* @param opts Values for the other options.
* @return A drawing option that will draw to the indicated window.
*
* @attribute class window
* @attribute suffix window_with_options
* @attribute method option_draw_to
* @attribute self dest
*/
drawing_options option_draw_to(window dest, drawing_options opts);

Expand Down
3 changes: 3 additions & 0 deletions coresdk/src/coresdk/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ namespace splashkit_lib
* already, then the name will be changed to generate a
* unique filename.
*
* @attribute class window
* @attribute suffix of_window
* @attribute method take_screenshot
* @attribute self wind
*/
void take_screenshot(window wind, const string &basename);

Expand Down
5 changes: 4 additions & 1 deletion coresdk/src/coresdk/point_drawing.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ namespace splashkit_lib
* @param y The distance from the top of the window to the pixel to read
* @return The color of the pixel at the supplied location
*
* @attribute class window
* @attribute class window
* @attribute suffix from_window
* @attribute method get_pixel
*/
color get_pixel_from_window(window destination, double x, double y);

Expand All @@ -209,7 +210,9 @@ namespace splashkit_lib
* @param pt The position of the pixel
* @return The color of the pixel at the supplied location
*
* @attribute class window
* @attribute suffix at_point_from_window
* @attribute method get_pixel
*/
color get_pixel_from_window(window destination, const point_2d &pt);

Expand Down
3 changes: 3 additions & 0 deletions coresdk/src/coresdk/point_geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ namespace splashkit_lib
*
* @param wind The window
* @return A point within the bounds of the window
*
* @attribute class window
* @attribute method random_point
*/
point_2d random_window_point(window wind);

Expand Down
1 change: 1 addition & 0 deletions coresdk/src/coresdk/rectangle_drawing.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ namespace splashkit_lib
*
* @attribute class window
* @attribute suffix with_options
* @attribute method fill_quad
*/
void fill_quad_on_window(window destination, color clr, const quad &q, const drawing_options &opts);

Expand Down
18 changes: 18 additions & 0 deletions coresdk/src/coresdk/text_input.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ namespace splashkit_lib
* @param wind The window where the text will be entered
* @param rect The area where the text will be entered.
*
* @attribute class window
* @attribute suffix in_window
* @attribute method start_reading_text
* @attribute self wind
*/
void start_reading_text(window wind, rectangle rect);

Expand All @@ -49,7 +52,10 @@ namespace splashkit_lib
* @param rect The area where the text will be entered.
* @param initial_text The initial text, which may be edited by the user.
*
* @attribute class window
* @attribute suffix in_window_with_initial_text
* @attribute method start_reading_text
* @attribute self wind
*/
void start_reading_text(window wind, rectangle rect, string initial_text);

Expand All @@ -76,7 +82,10 @@ namespace splashkit_lib
* @param wind The window to check
* @return True when window is setup to read input from the user.
*
* @attribute class window
* @attribute suffix in_window
* @attribute method reading_text
* @attribute self wind
*/
bool reading_text(window wind);

Expand All @@ -90,7 +99,10 @@ namespace splashkit_lib
*
* @param wind The window to end reading text
*
* @attribute class window
* @attribute suffix in_window
* @attribute method end_reading_text
* @attribute self wind
*/
void end_reading_text(window wind);

Expand All @@ -107,7 +119,10 @@ namespace splashkit_lib
* @param wind The window to check
* @return True when the use has cancelled text entry
*
* @attribute class window
* @attribute suffix in_window
* @attribute method text_entry_cancelled
* @attribute self wind
*/
bool text_entry_cancelled(window wind);

Expand All @@ -124,7 +139,10 @@ namespace splashkit_lib
* @param wind The window to check
* @return The user's text entry
*
* @attribute class window
* @attribute suffix in_window
* @attribute method text_input
* @attribute self wind
*/
string text_input(window wind);
}
Expand Down
166 changes: 166 additions & 0 deletions generated/csharp/SplashKit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31173,6 +31173,68 @@ public void FillCircle(Color clr, double x, double y, double radius, DrawingOpti
SplashKit.FillCircleOnWindow(this, clr, x, y, radius, opts);
}

/// <summary>
/// Returns the rectangle of the current clip area for a window
/// </summary>
/// <returns>The current clipping rectangle for the window</returns>
public Rectangle CurrentClip()
{
return SplashKit.CurrentClip(this);
}

/// <summary>
/// Remove the last clipping rectangle pushed to the window. This will then apply the previously pushed clipping rectangle.
/// </summary>
public void PopClip()
{
SplashKit.PopClip(this);
}

/// <summary>
/// Add the clipping rectangle of a window and uses the intersect between the new rectangle and previous clip. When a clipping rectangle is provided, drawing operations will only affect the area specified in the current clipping rectangle.
/// </summary>
/// <param name="r"> The new clipping rectangle</param>
public void PushClip(Rectangle r)
{
SplashKit.PushClip(this, r);
}

/// <summary>
/// Reset the clipping rectangle on a window. This will clear all of the clipping rectangles pushed to the window.
/// </summary>
public void ResetClip()
{
SplashKit.ResetClip(this);
}

/// <summary>
/// Set the clip rectangle of the window. This will clear any existing clipping rectangles pushed to the window, and use the supplied rectangle for clipping.
/// </summary>
/// <param name="r"> The new clipping rectangle</param>
public void SetClip(Rectangle r)
{
SplashKit.SetClip(this, r);
}

/// <summary>
/// Use this option to draw to a specified Window. Pass dest the Window you want to draw on.
/// </summary>
/// <returns>A drawing option that will draw to the indicated window.</returns>
public DrawingOptions OptionDrawTo()
{
return SplashKit.OptionDrawTo(this);
}

/// <summary>
/// Use this option to draw to a Bitmap. Pass dest the Bitmap you want to draw on to. Pass opts the other options you want use.
/// </summary>
/// <param name="opts"> Values for the other options.</param>
/// <returns>A drawing option that will draw to the indicated window.</returns>
public DrawingOptions OptionDrawTo(DrawingOptions opts)
{
return SplashKit.OptionDrawTo(this, opts);
}

/// <summary>
/// Draws an ellipse on the given window, using the provided location, and size.
/// </summary>
Expand Down Expand Up @@ -31269,6 +31331,15 @@ public void FillEllipse(Color clr, double x, double y, double width, double heig
SplashKit.FillEllipseOnWindow(this, clr, x, y, width, height, opts);
}

/// <summary>
/// Saves a screenshot of the current window to a bitmap file. The file will be saved onto the user's desktop.
/// </summary>
/// <param name="basename"> The base of the filename. If there is a file of this name already, then the name will be changed to generate a unique filename.</param>
public void TakeScreenshot(string basename)
{
SplashKit.TakeScreenshot(this, basename);
}

/// <summary>
/// Draws the bitmap supplied into `bmp` to the given window. at `x` and `y`.
/// </summary>
Expand Down Expand Up @@ -31363,6 +31434,36 @@ public void DrawLine(Color clr, double x1, double y1, double x2, double y2, Draw
SplashKit.DrawLineOnWindow(this, clr, x1, y1, x2, y2, opts);
}

/// <summary>
/// Returns the color of the pixel at the x,y location on the given window.
/// </summary>
/// <param name="pt"> The position of the pixel</param>
/// <returns>The color of the pixel at the supplied location</returns>
public Color GetPixel(Point2D pt)
{
return SplashKit.GetPixelFromWindow(this, pt);
}

/// <summary>
/// Returns the color of the pixel at the x,y location on the given window.
/// </summary>
/// <param name="x"> The distance from the left edge of the window to the pixel to read</param>
/// <param name="y"> The distance from the top of the window to the pixel to read</param>
/// <returns>The color of the pixel at the supplied location</returns>
public Color GetPixel(double x, double y)
{
return SplashKit.GetPixelFromWindow(this, x, y);
}

/// <summary>
/// Returns a random point on the provided window.
/// </summary>
/// <returns>A point within the bounds of the window</returns>
public Point2D RandomPoint()
{
return SplashKit.RandomWindowPoint(this);
}

/// <summary>
/// Draw a quad on the supplied window to the current window.
/// </summary>
Expand Down Expand Up @@ -31442,6 +31543,17 @@ public void FillQuad(Color clr, Quad q)
SplashKit.FillQuadOnWindow(this, clr, q);
}

/// <summary>
/// Fill a quad on the supplied window using the supplied drawing options.
/// </summary>
/// <param name="clr"> The color for the quad</param>
/// <param name="q"> The details of the quad</param>
/// <param name="opts"> The drawing options</param>
public void FillQuad(Color clr, Quad q, DrawingOptions opts)
{
SplashKit.FillQuadOnWindow(this, clr, q, opts);
}

/// <summary>
/// Fill a rectangle on the supplied window onto the current window.
/// </summary>
Expand Down Expand Up @@ -31573,6 +31685,60 @@ public void DrawText(string text, Color clr, Font fnt, int fontSize, double x, d
SplashKit.DrawTextOnWindow(this, text, clr, fnt, fontSize, x, y, opts);
}

/// <summary>
/// Ends reading text for the passed in window.
/// </summary>
public void EndReadingText()
{
SplashKit.EndReadingText(this);
}

/// <summary>
/// Returns true when the window is reading text.
/// </summary>
/// <returns>True when window is setup to read input from the user.</returns>
public bool ReadingText()
{
return SplashKit.ReadingText(this);
}

/// <summary>
/// Start reading text in the window within the bounds of the supplied rectangle.
/// </summary>
/// <param name="rect"> The area where the text will be entered.</param>
public void StartReadingText(Rectangle rect)
{
SplashKit.StartReadingText(this, rect);
}

/// <summary>
/// Start reading text in the window within the bounds of the supplied rectangle. The text will start with an initial value.
/// </summary>
/// <param name="rect"> The area where the text will be entered.</param>
/// <param name="initialText"> The initial text, which may be edited by the user.</param>
public void StartReadingText(Rectangle rect, string initialText)
{
SplashKit.StartReadingText(this, rect, initialText);
}

/// <summary>
/// Did the user press escape and cancel the enterring of text?
/// </summary>
/// <returns>True when the use has cancelled text entry</returns>
public bool TextEntryCancelled()
{
return SplashKit.TextEntryCancelled(this);
}

/// <summary>
/// The text the user has currently enterred on the current window.
/// </summary>
/// <returns>The user's text entry</returns>
public string TextInput()
{
return SplashKit.TextInput(this);
}

/// <summary>
/// Draw a triangle on a given window, using the supplied drawing options.
/// </summary>
Expand Down
Loading