11#ifndef SEEN_SP_MESH_ARRAY_H
12#define SEEN_SP_MESH_ARRAY_H
105 std::optional<Inkscape::Colors::Color>
color;
113 std::vector<std::vector< SPMeshNode* > > *
nodes;
118 SPMeshPatchI( std::vector<std::vector< SPMeshNode* > > *n,
int r,
int c );
130 std::optional<Inkscape::Colors::Color>
getColor(
unsigned i);
144 std::vector< std::vector< SPMeshNode* > >
nodes;
181 unsigned side_toggle (std::vector<unsigned>
const &);
182 unsigned side_arc (std::vector<unsigned>
const &);
186 unsigned insert (std::vector<unsigned>
const &);
190 std::vector<unsigned>
const &selected_corners,
Cartesian point / 2D vector and related operations.
3x3 matrix representing an affine transformation.
Axis-aligned rectangle that can be empty.
Two-dimensional point that doubles as a vector.
Wrapper around a Geom::PathVector object.
Base class for visual SVG elements.
std::vector< std::vector< SPMeshNode * > > nodes
bool fill_box(Geom::OptRect &box)
unsigned insert(std::vector< unsigned > const &)
Splits selected rows and/or columns in half (according to the path 't' parameter).
void split_row(unsigned i, unsigned n)
void split_column(unsigned j, unsigned n)
void update_node_vectors()
unsigned color_smooth(std::vector< unsigned > const &)
Attempts to smooth color transitions across corners.
void clear()
Clear mesh gradient.
unsigned patch_columns()
Number of patch columns.
unsigned side_arc(std::vector< unsigned > const &)
Converts generic Beziers to Beziers approximating elliptical arcs, preserving handle direction.
std::vector< SPMeshNode * > handles
bool read(SPMeshGradient *mg)
void bicubic(SPMeshNodeArray *smooth, SPMeshType type)
Fill 'smooth' with a smoothed version of the array by subdividing each patch into smaller patches.
unsigned side_toggle(std::vector< unsigned > const &)
Toggle sides between lineto and curve to if both corners selected.
unsigned tensor_toggle(std::vector< unsigned > const &)
Toggle sides between lineto and curve to if both corners selected.
void split_column(unsigned j, double coord)
std::vector< SPMeshNode * > corners
void transform(Geom::Affine const &m)
SPMeshNodeArray & operator=(const SPMeshNodeArray &rhs)
void print()
Print mesh gradient (for debugging).
void update_handles(unsigned corner, std::vector< unsigned > const &selected_corners, Geom::Point const &old_p, MeshNodeOperation op)
Moves handles in response to a corner node move.
bool adjacent_corners(unsigned i, unsigned j, SPMeshNode *n[4])
Inputs: i, j: Corner draggable indices.
void write(SPMeshGradient *mg)
Write repr using our array.
SPCurve outline_path() const
void split_row(unsigned i, double coord)
unsigned patch_rows()
Number of patch rows.
unsigned color_pick(std::vector< unsigned > const &, SPItem *)
Pick color from background for selected corners.
std::vector< SPMeshNode * > tensors
SPMeshNode * node(unsigned i, unsigned j)
std::optional< Inkscape::Colors::Color > color
void setColor(unsigned i, Inkscape::Colors::Color const &c)
Set color for corner of patch.
void setPoint(unsigned side, unsigned point, Geom::Point const &p, bool set=true)
Set point for side in proper order for patch.
char getPathType(unsigned i)
Get path type for side (stored in handle nodes).
std::vector< Geom::Point > getPointsForSide(unsigned i)
Returns vector of points for a side in proper order for a patch (clockwise order).
void setTensorPoint(unsigned i, Geom::Point const &p)
Set tensor control point for "corner" i.
bool tensorIsSet()
Return if any tensor control point is set.
void setStopPtr(unsigned i, SPStop *)
Set stop pointer for corner of patch.
bool tensorIsSet(unsigned i)
std::vector< std::vector< SPMeshNode * > > * nodes
Geom::Point getTensorPoint(unsigned i)
Return tensor control point for "corner" i.
SPStop * getStopPtr(unsigned i)
Return stop pointer for corner of patch.
Geom::Point coonsTensorPoint(unsigned i)
Find default tensor point (equivalent point to Coons Patch).
std::optional< Inkscape::Colors::Color > getColor(unsigned i)
Return color for corner of patch.
Geom::Point getPoint(unsigned side, unsigned point)
Returns point for side in proper order for patch.
void setPathType(unsigned, char t)
Set path type for side (stored in handle nodes).
void updateNodes()
Update default values for handle and tensor nodes.
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.
@ SP_MESH_GEOMETRY_NORMAL
@ SP_MESH_GEOMETRY_CONICAL
SPMeshType
A group of classes and functions for manipulating mesh gradients.
@ MG_CORNER_TENSOR_TOGGLE
Glib::RefPtr< Gtk::Adjustment > smooth