Inkscape
Vector Graphics Editor
|
#include <graphics.h>
Classes | |
struct | PaintArgs |
Public Member Functions | |
virtual | ~Graphics ()=default |
virtual void | set_scale_factor (int)=0 |
Set the HiDPI scale factor. | |
virtual void | set_outlines_enabled (bool)=0 |
Whether to maintain a second layer of outline content. | |
virtual void | set_background_in_stores (bool)=0 |
Whether to assume the first layer is drawn on top of background or transparency. | |
virtual void | set_colours (std::uint32_t page, std::uint32_t desk, std::uint32_t border)=0 |
Set colours for background/page shadow drawing. | |
virtual void | recreate_store (Geom::IntPoint const &dims)=0 |
Set the store to a surface of the given size, of unspecified contents. | |
virtual void | shift_store (Fragment const &dest)=0 |
Called when the store fragment shifts position to dest. | |
virtual void | swap_stores ()=0 |
Exchange the store and snapshot surfaces. | |
virtual void | fast_snapshot_combine ()=0 |
Paste the store onto the snapshot. | |
virtual void | snapshot_combine (Fragment const &dest)=0 |
Paste the snapshot followed by the store onto a new snapshot at dest. | |
virtual void | invalidate_snapshot ()=0 |
Indicate that the content in the snapshot store is not going to be used again. | |
virtual bool | is_opengl () const =0 |
Whether this is an OpenGL backend. | |
virtual void | invalidated_glstate ()=0 |
Tells the Graphics to no longer rely on any OpenGL state it had set up. | |
virtual Cairo::RefPtr< Cairo::ImageSurface > | request_tile_surface (Geom::IntRect const &rect, bool nogl)=0 |
Return a surface for drawing on. | |
virtual void | draw_tile (Fragment const &fragment, Cairo::RefPtr< Cairo::ImageSurface > surface, Cairo::RefPtr< Cairo::ImageSurface > outline_surface)=0 |
Commit the contents of a surface previously issued by request_tile_surface() to the canvas. | |
virtual void | junk_tile_surface (Cairo::RefPtr< Cairo::ImageSurface > surface)=0 |
Get rid of a surface previously issued by request_tile_surface() without committing it to the canvas. | |
virtual void | paint_widget (Fragment const &view, PaintArgs const &args, Cairo::RefPtr< Cairo::Context > const &cr)=0 |
Static Public Member Functions | |
static std::unique_ptr< Graphics > | create_gl (Prefs const &prefs, Stores const &stores, PageInfo const &pi) |
static std::unique_ptr< Graphics > | create_cairo (Prefs const &prefs, Stores const &stores, PageInfo const &pi) |
static bool | check_single_page (Fragment const &view, PageInfo const &pi) |
static std::pair< Geom::IntRect, Geom::IntRect > | calc_splitview_cliprects (Geom::IntPoint const &size, Geom::Point const &splitfrac, SplitDirection splitdir) |
static void | paint_splitview_controller (Geom::IntPoint const &size, Geom::Point const &splitfrac, SplitDirection splitdir, SplitDirection hoverdir, Cairo::RefPtr< Cairo::Context > const &cr) |
static void | paint_background (Fragment const &fragment, PageInfo const &pi, std::uint32_t page, std::uint32_t desk, Cairo::RefPtr< Cairo::Context > const &cr) |
Definition at line 37 of file graphics.h.
|
virtualdefault |
|
static |
Definition at line 96 of file graphics.cpp.
References Inkscape::EAST, Inkscape::NORTH, Inkscape::outline(), Inkscape::size, Inkscape::SOUTH, Inkscape::WEST, Geom::X, and Geom::Y.
Referenced by Inkscape::UI::Widget::CairoGraphics::paint_widget().
|
static |
Definition at line 165 of file graphics.cpp.
References Inkscape::UI::Widget::Fragment::affine, Geom::Affine::inverse(), and Inkscape::UI::Widget::Fragment::rect.
Referenced by paint_background().
|
static |
Definition at line 17 of file cairographics.cpp.
|
static |
Definition at line 355 of file glgraphics.cpp.
|
pure virtual |
Commit the contents of a surface previously issued by request_tile_surface() to the canvas.
In outline mode, a second surface must be passed containing the outline content, otherwise it should be null.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
|
pure virtual |
Paste the store onto the snapshot.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
Referenced by Inkscape::UI::Widget::Stores::snapshot_combine().
|
pure virtual |
Indicate that the content in the snapshot store is not going to be used again.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
|
pure virtual |
Tells the Graphics to no longer rely on any OpenGL state it had set up.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
|
pure virtual |
Whether this is an OpenGL backend.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
Referenced by Inkscape::UI::Widget::Stores::snapshot_combine().
|
pure virtual |
Get rid of a surface previously issued by request_tile_surface() without committing it to the canvas.
Usually useful only to dispose of surfaces which have gone into an error state while rendering, which is irreversible, and therefore we can't do anything useful with them.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
|
static |
Definition at line 54 of file graphics.cpp.
References check_single_page(), desk, fragment, geom_to_cairo(), and page.
Referenced by Inkscape::UI::Widget::CairoGraphics::paint_widget(), Inkscape::UI::Widget::CairoGraphics::recreate_store(), Inkscape::UI::Widget::CairoGraphics::shift_store(), and Inkscape::UI::Widget::CairoGraphics::snapshot_combine().
|
static |
Definition at line 119 of file graphics.cpp.
References Inkscape::EAST, Inkscape::NONE, Inkscape::size, and Inkscape::WEST.
Referenced by Inkscape::UI::Widget::CairoGraphics::paint_widget().
|
pure virtual |
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
|
pure virtual |
Set the store to a surface of the given size, of unspecified contents.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
Referenced by Inkscape::UI::Widget::Stores::recreate_store().
|
pure virtual |
Return a surface for drawing on.
If nogl is true, no GL commands are issued, as is a requirement off-main-thread. All such surfaces must be returned by passing them either to draw_tile() or junk_tile_surface().
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
|
pure virtual |
Whether to assume the first layer is drawn on top of background or transparency.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
|
pure virtual |
Set colours for background/page shadow drawing.
|
pure virtual |
Whether to maintain a second layer of outline content.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
|
pure virtual |
Set the HiDPI scale factor.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
|
pure virtual |
Called when the store fragment shifts position to dest.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
Referenced by Inkscape::UI::Widget::Stores::shift_store().
|
pure virtual |
Paste the snapshot followed by the store onto a new snapshot at dest.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
Referenced by Inkscape::UI::Widget::Stores::snapshot_combine().
|
pure virtual |
Exchange the store and snapshot surfaces.
Implemented in Inkscape::UI::Widget::CairoGraphics, and Inkscape::UI::Widget::GLGraphics.
Referenced by Inkscape::UI::Widget::Stores::take_snapshot().