FindReplaceDialog

From Inkscape Wiki
Revision as of 14:43, 7 April 2008 by Prokoudine (talk | contribs) (→‎Defining values: + moving to layers)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

'Find and replace' dialog specification

Synopsis

A function to find an object with defined properties and change these properties to some other ones is quite important in design and drafting workflow.

Several examples:

  • find all text objects where Times New Roman is used and substitute it with DejaVu Serif.
  • find all rectangles with horizontal/vertical between 50 and 70 and change it to 75
  • find all stars of a given color with 25+ spikes and randomize them
  • find all ellipses with given flat fill color and randomize that fill color between a given range of RGB/HSV/CMYK values.

Defining values

It should be possible to find:

  • an object by its ID;
  • all objects of a precisely given value;
  • all objects with a precisely given value plus a given amount of digits in the fraction;
  • all object below a given value;
  • all object above a given value;
  • all objects between two values.

It should be possible to replace found values with:

  • a precisely given value;
  • a value which a current value + user defined shift (e.g. in guides)
  • a random value in a given range of possible values (all values above X, any value between X and Y).
  • a rounded value with user defined precision.

It should also be possible to:

  • move all found objects to a user defined layer.

Types of replacement actions

Some actions can be performed to any object (such as changing fill/stroke), some are object specific (e.g. a rectangle has no spoke ratio).

Generic actions

  • change fill/stroke;
  • change width/height.
  • change initial XY position.

Object specific actions

All non-path objects

  • object/stroke to path

Path

  • combine/break apart;
  • inset/outset;
  • create dynamic/linked offset;
  • simplify;
  • reverse.

Rectangle

  • change horizontal/vertical radius

3D box

  • toggle VP between finite and infinite in XYZ directions;
  • change angle of PLs in XYZ direction.

Ellipse

  • change start/end angles ('make whole' as preset);
  • switch between segment/arc;

Star

  • toggle polygon/star;
  • change amount of corners;
  • change spoke ratio;
  • change rounding;
  • change randomization.

Spiral

  • change amount of turns;
  • change divergence;
  • change inner radius.

Text

  • change font family;
  • change font style (bolder/lighter in a given number of steps or precisely defined name of style);
  • change font size (a combobox to choose unit measure should be available);
  • change alignment;
  • toggle horizontal/vertical direction;
  • unflow;
  • remove from path;
  • remove manual kerns.

Connector

  • change spacing;
  • change length.

User interface

Because it should be possible to define several criteria, suggested is a tiles based GUI, where every tile is a criterion.

Tiles can be copied and pasted into new ones, so that it should be possible to construct complex criteria like "do something with all text objects with font size between 8 and 10 pt and do something different with all text objects with font size over 44 pt".

It should be possible to store criteria as reusable presets.

UI mockup is in works. Patience is a virtue :-)