# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx
# Anti-aliasing modes used by {Wx::GraphicsContext#set_antialias_mode}.
#
#
#
class AntialiasMode < Wx::Enum
# No anti-aliasing.
#
ANTIALIAS_NONE = Wx::AntialiasMode.new(0)
# The default anti-aliasing.
#
ANTIALIAS_DEFAULT = Wx::AntialiasMode.new(1)
end # AntialiasMode
# Interpolation quality used by {Wx::GraphicsContext#set_interpolation_quality}.
#
#
#
class InterpolationQuality < Wx::Enum
# default interpolation, based on type of context, in general medium quality
#
INTERPOLATION_DEFAULT = Wx::InterpolationQuality.new(0)
# no interpolation
#
INTERPOLATION_NONE = Wx::InterpolationQuality.new(1)
# fast interpolation, suited for interactivity
#
INTERPOLATION_FAST = Wx::InterpolationQuality.new(2)
# better quality
#
INTERPOLATION_GOOD = Wx::InterpolationQuality.new(3)
# best quality, not suited for interactivity
#
INTERPOLATION_BEST = Wx::InterpolationQuality.new(4)
end # InterpolationQuality
# Compositing is done using Porter-Duff compositions (see http://keithp.com/~keithp/porterduff/p253-porter.pdf) with {Wx::GraphicsContext#set_composition_mode}.
#
# The description give a short equation on how the values of a resulting pixel are calculated. R = Result, S = Source, D = Destination, colors premultiplied with alpha Ra, Sa, Da their alpha components
#
class CompositionMode < Wx::Enum
# Indicates invalid or unsupported composition mode.
#
COMPOSITION_INVALID = Wx::CompositionMode.new(-1)
# R = 0
#
COMPOSITION_CLEAR = Wx::CompositionMode.new(0)
# R = S
#
COMPOSITION_SOURCE = Wx::CompositionMode.new(1)
# R = S + D*(1 - Sa)
#
COMPOSITION_OVER = Wx::CompositionMode.new(2)
# R = S*Da
#
COMPOSITION_IN = Wx::CompositionMode.new(3)
# R = S*(1 - Da)
#
COMPOSITION_OUT = Wx::CompositionMode.new(4)
# R = S*Da + D*(1 - Sa)
#
COMPOSITION_ATOP = Wx::CompositionMode.new(5)
# R = D, essentially a noop
#
COMPOSITION_DEST = Wx::CompositionMode.new(6)
# R = S*(1 - Da) + D
#
COMPOSITION_DEST_OVER = Wx::CompositionMode.new(7)
# R = D*Sa
#
COMPOSITION_DEST_IN = Wx::CompositionMode.new(8)
# R = D*(1 - Sa)
#
COMPOSITION_DEST_OUT = Wx::CompositionMode.new(9)
# R = S*(1 - Da) + D*Sa
#
COMPOSITION_DEST_ATOP = Wx::CompositionMode.new(10)
# R = S*(1 - Da) + D*(1 - Sa)
#
COMPOSITION_XOR = Wx::CompositionMode.new(11)
# R = S + D
#
COMPOSITION_ADD = Wx::CompositionMode.new(12)
# Result is the absolute value of the difference between the source and the destination.
#
COMPOSITION_DIFF = Wx::CompositionMode.new(13)
end # CompositionMode
# Used to indicate what kind of gradient is set in a {Wx::GraphicsPenInfo} object.
#
#
#
class GradientType < Wx::Enum
#
#
GRADIENT_NONE = Wx::GradientType.new(0)
#
#
GRADIENT_LINEAR = Wx::GradientType.new(1)
#
#
GRADIENT_RADIAL = Wx::GradientType.new(2)
end # GradientType
#
#
NULL_GRAPHICS_PEN = nil
#
#
NULL_GRAPHICS_BRUSH = nil
#
#
NULL_GRAPHICS_FONT = nil
#
#
NULL_GRAPHICS_BITMAP = nil
#
#
NULL_GRAPHICS_MATRIX = nil
#
#
NULL_GRAPHICS_PATH = nil
# A {Wx::GraphicsContext} instance is the object that is drawn upon.
# It is created by a renderer using Wx::GraphicsRenderer#create_context. This can be either directly using a renderer instance, or indirectly using the static convenience {Wx::GraphicsContext.create} functions of {Wx::GraphicsContext} that always delegate the task to the default renderer.
#
# ```
# void MyCanvas::OnPaint(wxPaintEvent &event)
# {
# // Create paint DC
# wxPaintDC dc(this);
#
# // Create graphics context from it
# wxGraphicsContext *gc = wxGraphicsContext::Create( dc );
#
# if (gc)
# {
# // make a path that contains a circle and some lines
# gc->SetPen( *wxRED_PEN );
# wxGraphicsPath path = gc->CreatePath();
# path.AddCircle( 50.0, 50.0, 50.0 );
# path.MoveToPoint(0.0, 50.0);
# path.AddLineToPoint(100.0, 50.0);
# path.MoveToPoint(50.0, 0.0);
# path.AddLineToPoint(50.0, 100.0 );
# path.CloseSubpath();
# path.AddRectangle(25.0, 25.0, 50.0, 50.0);
#
# gc->StrokePath(path);
#
# delete gc;
# }
# }
# ```
#
# For some renderers (like Direct2D or Cairo) processing of drawing operations may be deferred (Direct2D render target normally builds up a batch of rendering commands but defers processing of these commands, Cairo operates on a separate surface) so to make drawing results visible you need to update the content of the context by calling {Wx::GraphicsContext#flush} or by destroying the context.
#
# ===
#
# Category: Graphics Device Interface (GDI), Device Contexts
# @see Wx::GraphicsRenderer#create_context
# @see Wx::GCDC
# @see Wx::DC
#
#
#
# @note This class is untracked and should not be derived from nor instances extended!
class GraphicsContext < GraphicsObject
# Resets the clipping to original shape.
# @return [void]
def reset_clip; end
# @overload clip(region)
# Sets the clipping region to the intersection of the given region and the previously set clipping region.
# The clipping region is an area to which drawing is restricted.
#
# - Clipping region should be given in logical coordinates.- Calling this function can only make the clipping region smaller, never larger.- You need to call {Wx::GraphicsContext#reset_clip} first if you want to set the clipping region exactly to the region specified.- If resulting clipping region is empty, then all drawing upon the context is clipped out (all changes made by drawing operations are masked out).
# @param region [Wx::Region]
# @return [void]
# @overload clip(x, y, w, h)
# This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
# @param x [Float]
# @param y [Float]
# @param w [Float]
# @param h [Float]
# @return [void]
def clip(*args) end
# Returns bounding box of the current clipping region.
# - If clipping region is empty, then empty rectangle is returned (x, y, w, h are set to zero).
# @param x [Float]
# @param y [Float]
# @param w [Float]
# @param h [Float]
# @return [void]
def get_clip_box(x, y, w, h) end
alias_method :clip_box, :get_clip_box
# @overload create_matrix(a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0)
# Creates a native affine transformation matrix from the passed in values.
# The default parameters result in an identity matrix.
# @param a [Float]
# @param b [Float]
# @param c [Float]
# @param d [Float]
# @param tx [Float]
# @param ty [Float]
# @return [Wx::GraphicsMatrix]
# @overload create_matrix(mat)
# Creates a native affine transformation matrix from the passed generic one.
# @param mat [Wx::AffineMatrix2DBase]
# @return [Wx::GraphicsMatrix]
def create_matrix(*args) end
# Concatenates the passed in transform with the current transform of this context.
# @param matrix [Wx::GraphicsMatrix]
# @return [void]
def concat_transform(matrix) end
# Gets the current transformation matrix of this context.
# @return [Wx::GraphicsMatrix]
def get_transform; end
alias_method :transform, :get_transform
# Rotates the current transformation matrix (in radians).
# @param angle [Float]
# @return [void]
def rotate(angle) end
# Scales the current transformation matrix.
# @param xScale [Float]
# @param yScale [Float]
# @return [void]
def scale(xScale, yScale) end
# Sets the current transformation matrix of this context.
# @param matrix [Wx::GraphicsMatrix]
# @return [void]
def set_transform(matrix) end
alias_method :transform=, :set_transform
# Translates the current transformation matrix.
# @param dx [Float]
# @param dy [Float]
# @return [void]
def translate(dx, dy) end
# Creates a native brush from a {Wx::Brush}.
# @param brush [Wx::Brush]
# @return [Wx::GraphicsBrush]
def create_brush(brush) end
# @overload create_linear_gradient_brush(x1, y1, x2, y2, c1, c2, matrix=Wx::NULL_GRAPHICS_MATRIX)
# Creates a native brush with a linear gradient.
# The brush starts at (x1, y1) and ends at (x2, y2). Either just the start and end gradient colours (c1 and c2) or full set of gradient stops can be specified.
# The version taking {Wx::GraphicsGradientStops} is new in wxWidgets 2.9.1.
# The matrix parameter was added in wxWidgets 3.1.3
# @param x1 [Float]
# @param y1 [Float]
# @param x2 [Float]
# @param y2 [Float]
# @param c1 [Wx::Colour,String,Symbol]
# @param c2 [Wx::Colour,String,Symbol]
# @param matrix [Wx::GraphicsMatrix]
# @return [Wx::GraphicsBrush]
# @overload create_linear_gradient_brush(x1, y1, x2, y2, stops, matrix=Wx::NULL_GRAPHICS_MATRIX)
# This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
# @param x1 [Float]
# @param y1 [Float]
# @param x2 [Float]
# @param y2 [Float]
# @param stops [Wx::GraphicsGradientStops]
# @param matrix [Wx::GraphicsMatrix]
# @return [Wx::GraphicsBrush]
def create_linear_gradient_brush(*args) end
# @overload create_radial_gradient_brush(startX, startY, endX, endY, radius, oColor, cColor, matrix=Wx::NULL_GRAPHICS_MATRIX)
# Creates a native brush with a radial gradient.
# The brush originates at (startX, startY) and ends on a circle around (endX, endY) with the given radius.
# The gradient may be specified either by its start and end colours oColor and cColor or by a full set of gradient stops.
# The version taking {Wx::GraphicsGradientStops} is new in wxWidgets 2.9.1.
# The ability to apply a transformation matrix to the gradient was added in 3.1.3
# @param startX [Float]
# @param startY [Float]
# @param endX [Float]
# @param endY [Float]
# @param radius [Float]
# @param oColor [Wx::Colour,String,Symbol]
# @param cColor [Wx::Colour,String,Symbol]
# @param matrix [Wx::GraphicsMatrix]
# @return [Wx::GraphicsBrush]
# @overload create_radial_gradient_brush(startX, startY, endX, endY, radius, stops, matrix=Wx::NULL_GRAPHICS_MATRIX)
# This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
# @param startX [Float]
# @param startY [Float]
# @param endX [Float]
# @param endY [Float]
# @param radius [Float]
# @param stops [Wx::GraphicsGradientStops]
# @param matrix [Wx::GraphicsMatrix]
# @return [Wx::GraphicsBrush]
def create_radial_gradient_brush(*args) end
# @overload set_brush(brush)
# Sets the brush for filling paths.
# @param brush [Wx::Brush]
# @return [void]
# @overload set_brush(brush)
# Sets the brush for filling paths.
# @param brush [Wx::GraphicsBrush]
# @return [void]
def set_brush(*args) end
alias_method :brush=, :set_brush
# @overload create_pen(pen)
# Creates a native pen from a {Wx::Pen}.
# Prefer to use the overload taking {Wx::GraphicsPenInfo} unless you already have a {Wx::Pen} as constructing one only to pass it to this method is wasteful.
# @param pen [Wx::Pen]
# @return [Wx::GraphicsPen]
# @overload create_pen(info)
# Creates a native pen from a {Wx::GraphicsPenInfo}.
# @param info [Wx::GraphicsPenInfo]
# @return [Wx::GraphicsPen]
def create_pen(*args) end
# @overload set_pen(pen)
# Sets the pen used for stroking.
# @param pen [Wx::Pen]
# @return [void]
# @overload set_pen(pen)
# Sets the pen used for stroking.
# @param pen [Wx::GraphicsPen]
# @return [void]
def set_pen(*args) end
alias_method :pen=, :set_pen
# @overload draw_bitmap(bmp, x, y, w, h)
# Draws the bitmap.
# In case of a mono bitmap, this is treated as a mask and the current brushed is used for filling.
# @param bmp [Wx::GraphicsBitmap]
# @param x [Float]
# @param y [Float]
# @param w [Float]
# @param h [Float]
# @return [void]
# @overload draw_bitmap(bmp, x, y, w, h)
# This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
# @param bmp [Wx::Bitmap]
# @param x [Float]
# @param y [Float]
# @param w [Float]
# @param h [Float]
# @return [void]
def draw_bitmap(*args) end
# Draws an ellipse.
# @param x [Float]
# @param y [Float]
# @param w [Float]
# @param h [Float]
# @return [void]
def draw_ellipse(x, y, w, h) end
# Draws the icon.
# @param icon [Wx::Icon]
# @param x [Float]
# @param y [Float]
# @param w [Float]
# @param h [Float]
# @return [void]
def draw_icon(icon, x, y, w, h) end
# Draws a polygon.
# @param points [Array>]
# @param fillStyle [PolygonFillMode]
# @return [void]
def draw_lines(points, fillStyle=Wx::PolygonFillMode::ODDEVEN_RULE) end
# Draws the path by first filling and then stroking.
# @param path [Wx::GraphicsPath]
# @param fillStyle [PolygonFillMode]
# @return [void]
def draw_path(path, fillStyle=Wx::PolygonFillMode::ODDEVEN_RULE) end
# Draws a rectangle.
# @param x [Float]
# @param y [Float]
# @param w [Float]
# @param h [Float]
# @return [void]
def draw_rectangle(x, y, w, h) end
# Draws a rounded rectangle.
# @param x [Float]
# @param y [Float]
# @param w [Float]
# @param h [Float]
# @param radius [Float]
# @return [void]
def draw_rounded_rectangle(x, y, w, h, radius) end
# @overload draw_text(str, x, y)
# Draws text at the defined position.
# @param str [String]
# @param x [Float]
# @param y [Float]
# @return [void]
# @overload draw_text(str, x, y, angle)
# Draws text at the defined position.
# @param str [String] The text to draw.
# @param x [Float] The x coordinate position to draw the text at.
# @param y [Float] The y coordinate position to draw the text at.
# @param angle [Float] The angle, in radians, relative to the (default) horizontal direction to draw the string.
# @return [void]
# @overload draw_text(str, x, y, backgroundBrush)
# Draws text at the defined position.
# @param str [String] The text to draw.
# @param x [Float] The x coordinate position to draw the text at.
# @param y [Float] The y coordinate position to draw the text at.
# @param backgroundBrush [Wx::GraphicsBrush] Brush to fill the text with.
# @return [void]
# @overload draw_text(str, x, y, angle, backgroundBrush)
# Draws text at the defined position.
# @param str [String] The text to draw.
# @param x [Float] The x coordinate position to draw the text at.
# @param y [Float] The y coordinate position to draw the text at.
# @param angle [Float] The angle, in radians, relative to the (default) horizontal direction to draw the string.
# @param backgroundBrush [Wx::GraphicsBrush] Brush to fill the text with.
# @return [void]
def draw_text(*args) end
# Creates a native graphics path which is initially empty.
# @return [Wx::GraphicsPath]
def create_path; end
# Fills the path with the current brush.
# @param path [Wx::GraphicsPath]
# @param fillStyle [PolygonFillMode]
# @return [void]
def fill_path(path, fillStyle=Wx::PolygonFillMode::ODDEVEN_RULE) end
# Strokes a single line.
# @param x1 [Float]
# @param y1 [Float]
# @param x2 [Float]
# @param y2 [Float]
# @return [void]
def stroke_line(x1, y1, x2, y2) end
# @overload stroke_lines(n)
# Stroke disconnected lines from begin to end points, fastest method available for this purpose.
# @param n [Array,Array>>]
# @return [void]
# @overload stroke_lines(points)
# Stroke lines connecting all the points.
# Unlike the other overload of this function, this method draws a single polyline and not a number of disconnected lines.
# @param points [Array>]
# @return [void]
def stroke_lines(*args) end
# Strokes along a path with the current pen.
# @param path [Wx::GraphicsPath]
# @return [void]
def stroke_path(path) end
# @overload create_font(font, col=Wx::BLACK)
# Creates a native graphics font from a {Wx::Font} and a text colour.
# For Direct2D graphics fonts can be created from TrueType fonts only.
# @param font [Wx::Font,Wx::FontInfo]
# @param col [Wx::Colour,String,Symbol]
# @return [Wx::GraphicsFont]
# @overload create_font(sizeInPixels, facename, flags=Wx::FontFlag::FONTFLAG_DEFAULT, col=Wx::BLACK)
# Creates a font object with the specified attributes.
# The use of overload taking {Wx::Font} is preferred, see Wx::GraphicsRenderer#create_font for more details.
# For Direct2D graphics fonts can be created from TrueType fonts only.
# @param sizeInPixels [Float]
# @param facename [String]
# @param flags [Integer]
# @param col [Wx::Colour,String,Symbol]
# @return [Wx::GraphicsFont]
def create_font(*args) end
# @overload set_font(font, colour)
# Sets the font for drawing text.
# For Direct2D only TrueType fonts can be used.
# @param font [Wx::Font,Wx::FontInfo]
# @param colour [Wx::Colour,String,Symbol]
# @return [void]
# @overload set_font(font)
# Sets the font for drawing text.
# @param font [Wx::GraphicsFont]
# @return [void]
def set_font(*args) end
alias_method :font=, :set_font
# Fills the widths array with the widths from the beginning of text to the corresponding character of text.
# @param text [String]
# @param widths [Wx::ArrayDouble]
# @return [void]
def get_partial_text_extents(text, widths) end
alias_method :partial_text_extents, :get_partial_text_extents
# Gets the dimensions of the string using the currently selected font.
# @param text [String] The text string to measure.
# @return [Array(Float,Float,Float,Float)]
def get_text_extent(text) end
alias_method :text_extent, :get_text_extent
# Begin a new document (relevant only for printing / pdf etc.) If there is a progress dialog, message will be shown.
# @param message [String]
# @return [true,false]
def start_doc(message) end
# Done with that document (relevant only for printing / pdf etc.)
# @return [void]
def end_doc; end
# Opens a new page (relevant only for printing / pdf etc.) with the given size in points.
# (If both are null the default page size will be used.)
# @param width [Float]
# @param height [Float]
# @return [void]
def start_page(width=0, height=0) end
# Ends the current page (relevant only for printing / pdf etc.)
# @return [void]
def end_page; end
# Creates {Wx::GraphicsBitmap} from an existing {Wx::Bitmap}.
# Returns an invalid {Wx::NULL_GRAPHICS_BITMAP} on failure.
# @param bitmap [Wx::Bitmap]
# @return [Wx::GraphicsBitmap]
def create_bitmap(bitmap) end
# Creates {Wx::GraphicsBitmap} from an existing {Wx::Image}.
# This method is more efficient than converting {Wx::Image} to {Wx::Bitmap} first and then calling {Wx::GraphicsContext#create_bitmap} but otherwise has the same effect.
# Returns an invalid {Wx::NULL_GRAPHICS_BITMAP} on failure.
# @param image [Wx::Image]
# @return [Wx::GraphicsBitmap]
def create_bitmap_from_image(image) end
# Extracts a sub-bitmap from an existing bitmap.
# @param bitmap [Wx::GraphicsBitmap]
# @param x [Float]
# @param y [Float]
# @param w [Float]
# @param h [Float]
# @return [Wx::GraphicsBitmap]
def create_sub_bitmap(bitmap, x, y, w, h) end
# All rendering will be done into a fully transparent temporary context.
# Layers can be nested by making balanced calls to {Wx::GraphicsContext#begin_layer}/EndLayer().
# @param opacity [Float]
# @return [void]
def begin_layer(opacity) end
# Composites back the drawings into the context with the opacity given at the {Wx::GraphicsContext#begin_layer} call.
# @return [void]
def end_layer; end
# Push the current state (like transformations, clipping region and quality settings) of the context on a stack.
# Multiple balanced calls to {Wx::GraphicsContext#push_state} and {Wx::GraphicsContext#pop_state} can be nested.
# @see Wx::GraphicsContext#pop_state
# @return [void]
def push_state; end
# Sets current state of the context to the state saved by a preceding call to {Wx::GraphicsContext#push_state} and removes that state from the stack of saved states.
#
# @see Wx::GraphicsContext#push_state
# @return [void]
def pop_state; end
# Make sure that the current content of this context is immediately visible.
# @return [void]
def flush; end
# Sets the antialiasing mode, returns true if it supported.
# @param antialias [AntialiasMode]
# @return [true,false]
def set_antialias_mode(antialias) end
alias_method :antialias_mode=, :set_antialias_mode
# Returns the current shape antialiasing mode.
# @return [AntialiasMode]
def get_antialias_mode; end
alias_method :antialias_mode, :get_antialias_mode
# Sets the interpolation quality, returns true if it is supported.
# Not implemented in Cairo backend currently.
# @param interpolation [InterpolationQuality]
# @return [true,false]
def set_interpolation_quality(interpolation) end
alias_method :interpolation_quality=, :set_interpolation_quality
# Returns the current interpolation quality.
# @return [InterpolationQuality]
def get_interpolation_quality; end
alias_method :interpolation_quality, :get_interpolation_quality
# Sets the compositing operator, returns true if it supported.
# @param op [CompositionMode]
# @return [true,false]
def set_composition_mode(op) end
alias_method :composition_mode=, :set_composition_mode
# Returns the current compositing operator.
# @return [CompositionMode]
def get_composition_mode; end
alias_method :composition_mode, :get_composition_mode
# Returns the size of the graphics context in device coordinates.
# @return [Array(Float,Float)]
def get_size; end
alias_method :size, :get_size
# Returns the resolution of the graphics context in device points per inch.
# @param dpiX [Float]
# @param dpiY [Float]
# @return [void]
def get_dpi(dpiX, dpiY) end
alias_method :dpi, :get_dpi
# Returns the associated window if any.
# If this context was created using {Wx::GraphicsContext.create} overload taking {Wx::Window} or {Wx::WindowDC}, this method returns the corresponding window. Otherwise returns NULL.
# A possibly NULL window pointer.
# @return [Wx::Window]
def get_window; end
alias_method :window, :get_window
# Helper to determine if a 0.5 offset should be applied for the drawing operation.
# @return [true,false]
def should_offset; end
# Indicates whether the context should try to offset for pixel boundaries.
# This only makes sense on bitmap devices like screen. By default this is turned off.
# @param enable [true,false]
# @return [void]
def enable_offset(enable=true) end
# Helper to determine if a 0.5 offset should be applied for the drawing operation.
# @return [void]
def disable_offset; end
# Helper to determine if a 0.5 offset should be applied for the drawing operation.
# @return [true,false]
def offset_enabled; end
# @overload from_dip(sz)
# Convert DPI-independent pixel values to the value in pixels appropriate for the graphics context.
# See {Wx::Window#from_dip(sz)} for more info about converting device independent pixel values.
# @param sz [Array(Integer, Integer), Wx::Size]
# @return [Wx::Size]
# @overload from_dip(pt)
# This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
# @param pt [Array(Integer, Integer), Wx::Point]
# @return [Wx::Point]
# @overload from_dip(d)
# Convert DPI-independent value in pixels to the value in pixels appropriate for the graphics context.
# This is the same as FromDIP(const {Wx::Size}& sz) overload, but assumes that the resolution is the same in horizontal and vertical directions.
# @param d [Integer]
# @return [Integer]
def from_dip(*args) end
# @overload to_dip(sz)
# Convert pixel values of the current graphics context to DPI-independent pixel values.
# See {Wx::Window#to_dip(sz)} for more info about converting device independent pixel values.
# @param sz [Array(Integer, Integer), Wx::Size]
# @return [Wx::Size]
# @overload to_dip(pt)
# This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
# @param pt [Array(Integer, Integer), Wx::Point]
# @return [Wx::Point]
# @overload to_dip(d)
# Convert pixel values of the current graphics context to DPI-independent pixel values.
# This is the same as ToDIP(const {Wx::Size}& sz) overload, but assumes that the resolution is the same in horizontal and vertical directions.
# @param d [Integer]
# @return [Integer]
def to_dip(*args) end
end # GraphicsContext
end