|
gtkmm 4.21.2
|
Auxiliary object for snapshots. More...
#include <gtkmm/snapshot.h>

Public Member Functions | |
| Snapshot (Snapshot && src) noexcept | |
| Snapshot & | operator= (Snapshot && src) noexcept |
| ~Snapshot () noexcept override | |
| GtkSnapshot * | gobj () |
| Provides access to the underlying C GObject. | |
| const GtkSnapshot * | gobj () const |
| Provides access to the underlying C GObject. | |
| GtkSnapshot * | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
| Glib::RefPtr< Gdk::Paintable > | to_paintable (const Gdk::Graphene::Size &size) |
| Returns a paintable encapsulating the render node that was constructed by snapshot. | |
| Glib::RefPtr< Gdk::Paintable > | to_paintable () |
| A to_paintable() convenience overload. | |
| void | push_debug (const Glib::ustring & name) |
| Creates a new debug node. | |
| void | push_opacity (double opacity) |
| Modifies the opacity of an image. | |
| void | push_isolation (Gsk::Isolation features) |
| Isolates the following drawing operations from previous ones. | |
| void | push_blur (double radius) |
| Blurs an image. | |
| void | push_repeat (const graphene_rect_t * bounds, const graphene_rect_t * child_bounds) |
| Creates a node that repeats the child node. | |
| void | push_repeat (const Gdk::Rectangle & bounds, const Gdk::Rectangle & child_bounds) |
| Creates a node that repeats the child node. | |
| void | push_repeat (const Gdk::Rectangle & bounds) |
| A push_repeat() convenience overload. | |
| void | push_repeat (const Gdk::Graphene::Rect & bounds, const Gdk::Graphene::Rect & child_bounds) |
| Creates a node that repeats the child node. | |
| void | push_repeat (const Gdk::Graphene::Rect & bounds) |
| A push_repeat() convenience overload. | |
| void | push_clip (const graphene_rect_t * bounds) |
| Clips an image to a rectangle. | |
| void | push_clip (const Gdk::Rectangle & bounds) |
| Clips an image to a rectangle. | |
| void | push_clip (const Gdk::Graphene::Rect & bounds) |
| Clips an image to a rectangle. | |
| void | push_rounded_clip (const Gsk::RoundedRect & bounds) |
| Clips an image to a rounded rectangle. | |
| void | push_blend (Gsk::BlendMode mask_mode) |
| Blends together two images with the given blend mode. | |
| void | push_mask (Gsk::MaskMode mask_mode) |
| Until the first call to pop(), the mask image for the mask operation will be recorded. | |
| void | push_copy () |
| Stores the current rendering state for later pasting via append_paste(). | |
| void | push_composite (GskPorterDuff op) |
| Until the first call to pop(), the mask image for the mask operation will be recorded. | |
| void | push_cross_fade (double progress) |
| Snapshots a cross-fade operation between two images with the given progress. | |
| void | gl_shader_pop_texture () |
| Removes the top element from the stack of render nodes and adds it to the nearest Gsk::GLShaderNode below it. | |
| void | pop () |
| Removes the top element from the stack of render nodes, and appends it to the node underneath it. | |
| void | save () |
| Makes a copy of the current state of snapshot and saves it on an internal stack. | |
| void | restore () |
| Restores snapshot to the state saved by a preceding call to save() and removes that state from the stack of saved states. | |
| void | transform (const Glib::RefPtr< const Gsk::Transform > & transform) |
| Transforms snapshot's coordinate system with the given transform. | |
| void | translate (const Gdk::Graphene::Point & point) |
| Translates snapshot's coordinate system by point in 2-dimensional space. | |
| void | rotate (float angle) |
| Rotates @ snapshot's coordinate system by angle degrees in 2D space - or in 3D speak, rotates around the Z axis. | |
| void | scale (float factor_x, float factor_y) |
| Scales snapshot's coordinate system in 2-dimensional space by the given factors. | |
| void | scale (float factor_x, float factor_y, float factor_z) |
| Scales snapshot's coordinate system by the given factors. | |
| void | perspective (float depth) |
| Applies a perspective projection transform. | |
| Cairo::RefPtr< Cairo::Context > | append_cairo (const graphene_rect_t * bounds) |
| Creates a new Gsk::CairoNode and appends it to the current render node of snapshot, without changing the current node. | |
| Cairo::RefPtr< Cairo::Context > | append_cairo (const Gdk::Rectangle & bounds) |
| Creates a new Gsk::CairoNode and appends it to the current render node of snapshot, without changing the current node. | |
| Cairo::RefPtr< Cairo::Context > | append_cairo (const Gdk::Graphene::Rect & bounds) |
| Creates a new Gsk::CairoNode and appends it to the current render node of snapshot, without changing the current node. | |
| void | append_texture (const Glib::RefPtr< Gdk::Texture > & texture, const graphene_rect_t * bounds) |
| Creates a new render node drawing the texture into the given bounds and appends it to the current render node of snapshot. | |
| void | append_texture (const Glib::RefPtr< Gdk::Texture > & texture, const Gdk::Rectangle & bounds) |
| Creates a new render node drawing the texture into the given bounds and appends it to the current render node of snapshot. | |
| void | append_texture (const Glib::RefPtr< Gdk::Texture > & texture, const Gdk::Graphene::Rect & bounds) |
| Creates a new render node drawing the texture into the given bounds and appends it to the current render node of snapshot. | |
| void | append_scaled_texture (const Glib::RefPtr< Gdk::Texture > & texture, Gsk::ScalingFilter filter, const Gdk::Graphene::Rect & bounds) |
| Creates a new render node drawing the texture into the given bounds and appends it to the current render node of snapshot. | |
| void | append_color (const Gdk::RGBA & color, const graphene_rect_t * bounds) |
| Creates a new render node drawing the color into the given bounds and appends it to the current render node of snapshot. | |
| void | append_color (const Gdk::RGBA & color, const Gdk::Rectangle & bounds) |
| Creates a new render node drawing the color into the given bounds and appends it to the current render node of snapshot. | |
| void | append_color (const Gdk::RGBA & color, const Gdk::Graphene::Rect & bounds) |
| Creates a new render node drawing the color into the given bounds and appends it to the current render node of snapshot. | |
| void | append_inset_shadow (const Gsk::RoundedRect & outline, const Gdk::RGBA & color, float dx, float dy, float spread, float blur_radius) |
| Appends an inset shadow into the box given by outline. | |
| void | append_outset_shadow (const Gsk::RoundedRect & outline, const Gdk::RGBA & color, float dx, float dy, float spread, float blur_radius) |
| Appends an outset shadow node around the box given by outline. | |
| void | append_layout (const Glib::RefPtr< Pango::Layout > & layout, const Gdk::RGBA & color) |
| Creates render nodes for rendering layout in the given foregound color and appends them to the current node of snapshot without changing the current node. | |
| void | append_paste (const Gdk::Graphene::Rect & bounds, gsize nth) |
| Creates a new render node that pastes the contents copied by a previous call to push_copy(). | |
| void | render_backgrount (const Glib::RefPtr< StyleContext > & context, double x, double y, double width, double height) |
| Creates a render node for the CSS background according to context, and appends it to the current node of snapshot, without changing the current node. | |
| void | render_background (const Glib::RefPtr< StyleContext > & context, double x, double y, double width, double height) |
| Creates a render node for the CSS background according to context, and appends it to the current node of snapshot, without changing the current node. | |
| void | render_frame (const Glib::RefPtr< StyleContext > & context, double x, double y, double width, double height) |
| Creates a render node for the CSS border according to context, and appends it to the current node of snapshot, without changing the current node. | |
| void | render_focus (const Glib::RefPtr< StyleContext > & context, double x, double y, double width, double height) |
| Creates a render node for the focus outline according to context, and appends it to the current node of snapshot, without changing the current node. | |
| void | render_layout (const Glib::RefPtr< StyleContext > & context, double x, double y, const Glib::RefPtr< Pango::Layout > & layout) |
| Creates a render node for rendering layout according to the style information in context, and appends it to the current node of snapshot, without changing the current node. | |
| void | render_insertion_cursor (const Glib::RefPtr< StyleContext > & context, double x, double y, const Glib::RefPtr< Pango::Layout > & layout, int index, Pango::Direction direction) |
| Draws a text caret using snapshot at the specified index of layout. | |
| Public Member Functions inherited from Gdk::Snapshot | |
| Snapshot (Snapshot && src) noexcept | |
| Snapshot & | operator= (Snapshot && src) noexcept |
| ~Snapshot () noexcept override | |
| GdkSnapshot * | gobj () |
| Provides access to the underlying C GObject. | |
| const GdkSnapshot * | gobj () const |
| Provides access to the underlying C GObject. | |
| GdkSnapshot * | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
| Public Member Functions inherited from Glib::Object | |
| Object (const Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&src) noexcept | |
| Object & | operator= (Object &&src) noexcept |
| void * | get_data (const QueryQuark &key) |
| void | set_data (const Quark &key, void *data) |
| void | set_data_with_c_callback (const Quark &key, void *data, GDestroyNotify notify) |
| void | set_data (const Quark &key, void *data, DestroyNotify notify) |
| void | remove_data (const QueryQuark &quark) |
| void * | steal_data (const QueryQuark &quark) |
| Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
| Public Member Functions inherited from Glib::ObjectBase | |
| ObjectBase (const ObjectBase &)=delete | |
| ObjectBase & | operator= (const ObjectBase &)=delete |
| void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
| void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
| void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
| void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
| PropertyType | get_property (const Glib::ustring &property_name) const |
| sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot) |
| sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot) |
| void | freeze_notify () |
| void | thaw_notify () |
| virtual void | reference () const |
| virtual void | unreference () const |
| GObject * | gobj () |
| const GObject * | gobj () const |
| GObject * | gobj_copy () const |
Static Public Member Functions | |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. | |
| static Glib::RefPtr< Snapshot > | create () |
| Creates a new Gtk::Snapshot. | |
| Static Public Member Functions inherited from Gdk::Snapshot | |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| Glib::RefPtr< Gtk::Snapshot > | wrap_gtk_snapshot (GtkSnapshot * object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
| Related Symbols inherited from Gdk::Snapshot | |
| Glib::RefPtr< Gdk::Snapshot > | wrap (GdkSnapshot * object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Additional Inherited Members | |
| Public Types inherited from Glib::Object | |
| typedef void(*)(gpointer data | DestroyNotify) |
| Protected Member Functions inherited from Glib::Object | |
| Object () | |
| Object (const Glib::ConstructParams &construct_params) | |
| Object (GObject *castitem) | |
| ~Object () noexcept override | |
| Protected Member Functions inherited from Glib::ObjectBase | |
| ObjectBase () | |
| ObjectBase (const char *custom_type_name) | |
| ObjectBase (const std::type_info &custom_type_info) | |
| ObjectBase (ObjectBase &&src) noexcept | |
| ObjectBase & | operator= (ObjectBase &&src) noexcept |
| virtual | ~ObjectBase () noexcept=0 |
| void | initialize (GObject *castitem) |
| void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
Auxiliary object for snapshots.
Snapshot is an auxiliary object that assists in creating GskRenderNodes in Gtk::Widget::snapshot_vfunc(). It functions in a similar way to a cairo context, and maintains a stack of render nodes and their associated transformations.
The node at the top of the stack is the the one that append_node() operates on. Use the push() and pop() functions to change the current node.
The typical way to obtain a Snapshot object is as an argument to Gtk::Widget::snapshot_vfunc(). If you need to create your own Snapshot, use create().
|
noexcept |
|
overridenoexcept |
| Cairo::RefPtr< Cairo::Context > Gtk::Snapshot::append_cairo | ( | const Gdk::Graphene::Rect & | bounds | ) |
Creates a new Gsk::CairoNode and appends it to the current render node of snapshot, without changing the current node.
| bounds | The bounds for the new node. |
| Cairo::RefPtr< Cairo::Context > Gtk::Snapshot::append_cairo | ( | const Gdk::Rectangle & | bounds | ) |
Creates a new Gsk::CairoNode and appends it to the current render node of snapshot, without changing the current node.
| bounds | The bounds for the new node. |
| Cairo::RefPtr< Cairo::Context > Gtk::Snapshot::append_cairo | ( | const graphene_rect_t * | bounds | ) |
Creates a new Gsk::CairoNode and appends it to the current render node of snapshot, without changing the current node.
| bounds | The bounds for the new node. |
| void Gtk::Snapshot::append_color | ( | const Gdk::RGBA & | color, |
| const Gdk::Graphene::Rect & | bounds ) |
Creates a new render node drawing the color into the given bounds and appends it to the current render node of snapshot.
You should try to avoid calling this function if color is transparent.
| color | The color to draw. |
| bounds | The bounds for the new node. |
| void Gtk::Snapshot::append_color | ( | const Gdk::RGBA & | color, |
| const Gdk::Rectangle & | bounds ) |
Creates a new render node drawing the color into the given bounds and appends it to the current render node of snapshot.
You should try to avoid calling this function if color is transparent.
| color | The color to draw. |
| bounds | The bounds for the new node. |
| void Gtk::Snapshot::append_color | ( | const Gdk::RGBA & | color, |
| const graphene_rect_t * | bounds ) |
Creates a new render node drawing the color into the given bounds and appends it to the current render node of snapshot.
You should try to avoid calling this function if color is transparent.
| color | The color to draw. |
| bounds | The bounds for the new node. |
| void Gtk::Snapshot::append_inset_shadow | ( | const Gsk::RoundedRect & | outline, |
| const Gdk::RGBA & | color, | ||
| float | dx, | ||
| float | dy, | ||
| float | spread, | ||
| float | blur_radius ) |
Appends an inset shadow into the box given by outline.
| outline | Outline of the region surrounded by shadow. |
| color | Color of the shadow. |
| dx | Horizontal offset of shadow. |
| dy | Vertical offset of shadow. |
| spread | How far the shadow spreads towards the inside. |
| blur_radius | How much blur to apply to the shadow. |
| void Gtk::Snapshot::append_layout | ( | const Glib::RefPtr< Pango::Layout > & | layout, |
| const Gdk::RGBA & | color ) |
Creates render nodes for rendering layout in the given foregound color and appends them to the current node of snapshot without changing the current node.
The current theme's foreground color for a widget can be obtained with Gtk::Widget::get_color().
Note that if the layout does not produce any visible output, then nodes may not be added to the snapshot.
| layout | The Pango::Layout to render. |
| color | The foreground color to render the layout in. |
| void Gtk::Snapshot::append_outset_shadow | ( | const Gsk::RoundedRect & | outline, |
| const Gdk::RGBA & | color, | ||
| float | dx, | ||
| float | dy, | ||
| float | spread, | ||
| float | blur_radius ) |
Appends an outset shadow node around the box given by outline.
| outline | Outline of the region surrounded by shadow. |
| color | Color of the shadow. |
| dx | Horizontal offset of shadow. |
| dy | Vertical offset of shadow. |
| spread | How far the shadow spreads towards the outside. |
| blur_radius | How much blur to apply to the shadow. |
| void Gtk::Snapshot::append_paste | ( | const Gdk::Graphene::Rect & | bounds, |
| gsize | nth ) |
Creates a new render node that pastes the contents copied by a previous call to push_copy().
| bounds | The bounds for the new node. |
| nth | The index of the copy, with 0 being the latest copy, 1 being the copy before that, and so on. |
| void Gtk::Snapshot::append_scaled_texture | ( | const Glib::RefPtr< Gdk::Texture > & | texture, |
| Gsk::ScalingFilter | filter, | ||
| const Gdk::Graphene::Rect & | bounds ) |
Creates a new render node drawing the texture into the given bounds and appends it to the current render node of snapshot.
In contrast to append_texture(), this function provides control about how the filter that is used when scaling.
| texture | The texture to render. |
| filter | The filter to use. |
| bounds | The bounds for the new node. |
| void Gtk::Snapshot::append_texture | ( | const Glib::RefPtr< Gdk::Texture > & | texture, |
| const Gdk::Graphene::Rect & | bounds ) |
Creates a new render node drawing the texture into the given bounds and appends it to the current render node of snapshot.
If the texture needs to be scaled to fill bounds, linear filtering is used. See append_scaled_texture() if you need other filtering, such as nearest-neighbour.
| texture | The texture to render. |
| bounds | The bounds for the new node. |
| void Gtk::Snapshot::append_texture | ( | const Glib::RefPtr< Gdk::Texture > & | texture, |
| const Gdk::Rectangle & | bounds ) |
Creates a new render node drawing the texture into the given bounds and appends it to the current render node of snapshot.
If the texture needs to be scaled to fill bounds, linear filtering is used. See append_scaled_texture() if you need other filtering, such as nearest-neighbour.
| texture | The texture to render. |
| bounds | The bounds for the new node. |
| void Gtk::Snapshot::append_texture | ( | const Glib::RefPtr< Gdk::Texture > & | texture, |
| const graphene_rect_t * | bounds ) |
Creates a new render node drawing the texture into the given bounds and appends it to the current render node of snapshot.
If the texture needs to be scaled to fill bounds, linear filtering is used. See append_scaled_texture() if you need other filtering, such as nearest-neighbour.
| texture | The texture to render. |
| bounds | The bounds for the new node. |
|
static |
Creates a new Gtk::Snapshot.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
| void Gtk::Snapshot::gl_shader_pop_texture | ( | ) |
Removes the top element from the stack of render nodes and adds it to the nearest Gsk::GLShaderNode below it.
This must be called the same number of times as the number of textures is needed for the shader in push_gl_shader().
Deprecated: 4.16: GTK's new Vulkan-focused rendering does not support this feature. Use Gtk::GLArea for OpenGL rendering.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
| GtkSnapshot * Gtk::Snapshot::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| void Gtk::Snapshot::perspective | ( | float | depth | ) |
Applies a perspective projection transform.
See Gsk::Transform::perspective() for a discussion on the details.
| depth | Distance of the z=0 plane. |
| void Gtk::Snapshot::pop | ( | ) |
Removes the top element from the stack of render nodes, and appends it to the node underneath it.
| void Gtk::Snapshot::push_blend | ( | Gsk::BlendMode | mask_mode | ) |
Blends together two images with the given blend mode.
Until the first call to pop(), the bottom image for the blend operation will be recorded. After that call, the top image to be blended will be recorded until the second call to pop().
Calling this function requires two subsequent calls to pop().
| mask_mode | Blend mode to use. |
| void Gtk::Snapshot::push_blur | ( | double | radius | ) |
Blurs an image.
The image is recorded until the next call to pop().
| radius | The blur radius to use. Must be positive. |
| void Gtk::Snapshot::push_clip | ( | const Gdk::Graphene::Rect & | bounds | ) |
Clips an image to a rectangle.
The image is recorded until the next call to pop().
| bounds | The rectangle to clip to. |
| void Gtk::Snapshot::push_clip | ( | const Gdk::Rectangle & | bounds | ) |
Clips an image to a rectangle.
The image is recorded until the next call to pop().
| bounds | The rectangle to clip to. |
| void Gtk::Snapshot::push_clip | ( | const graphene_rect_t * | bounds | ) |
Clips an image to a rectangle.
The image is recorded until the next call to pop().
| bounds | The rectangle to clip to. |
| void Gtk::Snapshot::push_composite | ( | GskPorterDuff | op | ) |
| void Gtk::Snapshot::push_copy | ( | ) |
Stores the current rendering state for later pasting via append_paste().
Pasting is possible until the matching call to pop().
| void Gtk::Snapshot::push_cross_fade | ( | double | progress | ) |
Snapshots a cross-fade operation between two images with the given progress.
Until the first call to pop(), the start image will be snapshot. After that call, the end image will be recorded until the second call to pop().
Calling this function requires two subsequent calls to pop().
| progress | Progress between 0.0 and 1.0. |
| void Gtk::Snapshot::push_debug | ( | const Glib::ustring & | name | ) |
Creates a new debug node.
| name | The name for the new node, or an empty string for no name. |
| void Gtk::Snapshot::push_isolation | ( | Gsk::Isolation | features | ) |
Isolates the following drawing operations from previous ones.
You can express "everything but these flags" in a forward compatible way by using bit math: GSK_ISOLATION_ALL & ~(GSK_ISOLATION_BACKGROUND | GSK_ISOLATION_COPY_PASTE) will isolate everything but background and copy/paste.
For what isolation features exist, see Gsk::Isolation.
Content is isolated until the next call to pop().
| features | Features that are isolated. |
| void Gtk::Snapshot::push_mask | ( | Gsk::MaskMode | mask_mode | ) |
| void Gtk::Snapshot::push_opacity | ( | double | opacity | ) |
Modifies the opacity of an image.
The image is recorded until the next call to pop().
| opacity | The opacity to use. |
| void Gtk::Snapshot::push_repeat | ( | const Gdk::Graphene::Rect & | bounds | ) |
A push_repeat() convenience overload.
| void Gtk::Snapshot::push_repeat | ( | const Gdk::Graphene::Rect & | bounds, |
| const Gdk::Graphene::Rect & | child_bounds ) |
Creates a node that repeats the child node.
The child is recorded until the next call to pop().
| bounds | The bounds within which to repeat. |
| child_bounds | The bounds of the child or nullptr to use the full size of the collected child node. |
| void Gtk::Snapshot::push_repeat | ( | const Gdk::Rectangle & | bounds | ) |
A push_repeat() convenience overload.
| void Gtk::Snapshot::push_repeat | ( | const Gdk::Rectangle & | bounds, |
| const Gdk::Rectangle & | child_bounds ) |
Creates a node that repeats the child node.
The child is recorded until the next call to pop().
| bounds | The bounds within which to repeat. |
| child_bounds | The bounds of the child or nullptr to use the full size of the collected child node. |
| void Gtk::Snapshot::push_repeat | ( | const graphene_rect_t * | bounds, |
| const graphene_rect_t * | child_bounds ) |
Creates a node that repeats the child node.
The child is recorded until the next call to pop().
| bounds | The bounds within which to repeat. |
| child_bounds | The bounds of the child or nullptr to use the full size of the collected child node. |
| void Gtk::Snapshot::push_rounded_clip | ( | const Gsk::RoundedRect & | bounds | ) |
Clips an image to a rounded rectangle.
The image is recorded until the next call to pop().
| bounds | The rounded rectangle to clip to. |
| void Gtk::Snapshot::render_background | ( | const Glib::RefPtr< StyleContext > & | context, |
| double | x, | ||
| double | y, | ||
| double | width, | ||
| double | height ) |
Creates a render node for the CSS background according to context, and appends it to the current node of snapshot, without changing the current node.
Deprecated: 4.10
| context | The style context that defines the background. |
| x | X origin of the rectangle. |
| y | Y origin of the rectangle. |
| width | Rectangle width. |
| height | Rectangle height. |
| void Gtk::Snapshot::render_backgrount | ( | const Glib::RefPtr< StyleContext > & | context, |
| double | x, | ||
| double | y, | ||
| double | width, | ||
| double | height ) |
Creates a render node for the CSS background according to context, and appends it to the current node of snapshot, without changing the current node.
Deprecated: 4.10
| context | The style context that defines the background. |
| x | X origin of the rectangle. |
| y | Y origin of the rectangle. |
| width | Rectangle width. |
| height | Rectangle height. |
| void Gtk::Snapshot::render_focus | ( | const Glib::RefPtr< StyleContext > & | context, |
| double | x, | ||
| double | y, | ||
| double | width, | ||
| double | height ) |
Creates a render node for the focus outline according to context, and appends it to the current node of snapshot, without changing the current node.
Deprecated: 4.10
| context | The style context that defines the focus ring. |
| x | X origin of the rectangle. |
| y | Y origin of the rectangle. |
| width | Rectangle width. |
| height | Rectangle height. |
| void Gtk::Snapshot::render_frame | ( | const Glib::RefPtr< StyleContext > & | context, |
| double | x, | ||
| double | y, | ||
| double | width, | ||
| double | height ) |
Creates a render node for the CSS border according to context, and appends it to the current node of snapshot, without changing the current node.
Deprecated: 4.10
| context | The style context that defines the frame. |
| x | X origin of the rectangle. |
| y | Y origin of the rectangle. |
| width | Rectangle width. |
| height | Rectangle height. |
| void Gtk::Snapshot::render_insertion_cursor | ( | const Glib::RefPtr< StyleContext > & | context, |
| double | x, | ||
| double | y, | ||
| const Glib::RefPtr< Pango::Layout > & | layout, | ||
| int | index, | ||
| Pango::Direction | direction ) |
Draws a text caret using snapshot at the specified index of layout.
Deprecated: 4.10
| context | A Gtk::StyleContext. |
| x | X origin. |
| y | Y origin. |
| layout | The Pango::Layout of the text. |
| index | The index in the Pango::Layout. |
| direction | The Pango::Direction of the text. |
| void Gtk::Snapshot::render_layout | ( | const Glib::RefPtr< StyleContext > & | context, |
| double | x, | ||
| double | y, | ||
| const Glib::RefPtr< Pango::Layout > & | layout ) |
Creates a render node for rendering layout according to the style information in context, and appends it to the current node of snapshot, without changing the current node.
Deprecated: 4.10
| context | The style context that defines the text. |
| x | X origin of the rectangle. |
| y | Y origin of the rectangle. |
| layout | The Pango::Layout to render. |
| void Gtk::Snapshot::restore | ( | ) |
Restores snapshot to the state saved by a preceding call to save() and removes that state from the stack of saved states.
| void Gtk::Snapshot::rotate | ( | float | angle | ) |
Rotates @ snapshot's coordinate system by angle degrees in 2D space - or in 3D speak, rotates around the Z axis.
The rotation happens around the origin point of (0, 0) in the snapshot's current coordinate system.
To rotate around axes other than the Z axis, use Gsk::Transform::rotate_3d().
| angle | The rotation angle, in degrees (clockwise). |
| void Gtk::Snapshot::save | ( | ) |
Makes a copy of the current state of snapshot and saves it on an internal stack.
When restore() is called, snapshot will be restored to the saved state.
Multiple calls to save() and restore() can be nested; each call to restore() restores the state from the matching paired save().
It is necessary to clear all saved states with corresponding calls to restore().
| void Gtk::Snapshot::scale | ( | float | factor_x, |
| float | factor_y ) |
Scales snapshot's coordinate system in 2-dimensional space by the given factors.
Use scale_3d() to scale in all 3 dimensions.
| factor_x | Scaling factor on the X axis. |
| factor_y | Scaling factor on the Y axis. |
| void Gtk::Snapshot::scale | ( | float | factor_x, |
| float | factor_y, | ||
| float | factor_z ) |
Scales snapshot's coordinate system by the given factors.
| factor_x | Scaling factor on the X axis. |
| factor_y | Scaling factor on the Y axis. |
| factor_z | Scaling factor on the Z axis. |
| Glib::RefPtr< Gdk::Paintable > Gtk::Snapshot::to_paintable | ( | ) |
A to_paintable() convenience overload.
| Glib::RefPtr< Gdk::Paintable > Gtk::Snapshot::to_paintable | ( | const Gdk::Graphene::Size & | size | ) |
Returns a paintable encapsulating the render node that was constructed by snapshot.
After calling this function, it is no longer possible to add more nodes to snapshot. The only function that should be called after this is GObject::Object::unref().
| size | The size of the resulting paintable or nullptr to use the bounds of the snapshot. |
| void Gtk::Snapshot::transform | ( | const Glib::RefPtr< const Gsk::Transform > & | transform | ) |
Transforms snapshot's coordinate system with the given transform.
| transform | The transform to apply. |
| void Gtk::Snapshot::translate | ( | const Gdk::Graphene::Point & | point | ) |
Translates snapshot's coordinate system by point in 2-dimensional space.
| point | The point to translate the snapshot by. |
|
A Glib::wrap() method for this object.
It's not called wrap() because GtkSnapshot is a typedef of GdkSnapshot.
| object | The C instance. |
| take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |