This category of extensions is useful for preparing SVG drawings for use on the Web. There are two submenus. The first is for adding JavaScript controls that enable events on one object to change other objects. The second is for cutting an image into multiple parts for use on web pages with the help of CSS.
This submenu has two entries. The first allows events linked to one object (mouse over, clicking on, etc.) to control the attributes of another object. The second allows events linked to one object to transmit that object's attributes to another. These extensions embed JavaScript into the SVG file. The JavaScript comes from the InkWeb package. To function, the code requires a JavaScript-enabled browser (native support in Firefox, Opera, Safari, Chrome, and Internet Explorer 9, support via plug-in for older versions of Internet Explorer).
This extension creates the JavaScript so that an action (clicking on, mouse passing over, etc.) with one object changes the attributes of another object. The list of attributes to change is entered, separated by spaces, in the Attribute to set entry box (e.g., fill stroke stroke-width). The action that will cause the change is set in the When the set must be done? drop-down menu. The list of new values is entered, separated by spaces, in the Value to set entry box. The list of values must match the Attributes to set line (e.g., green black 2px). The next option specifies if this action should come before, after, or replace any previously defined actions. The final option determines, in the case where more than two objects are selected, if the first selected object controls all the other selected objects or if the last selected object is controlled by actions on all the other selected objects.
This extension creates the JavaScript so that an action (clicking on, mouse passing over, etc.) with one object changes specified attributes of another object to have the same value as the first. The list of attributes to change is entered, separated by spaces, in the Attribute to transmit entry box (e.g., fill stroke stroke-width). The action that will cause the change is declared in the When to transmit drop-down menu. The next option specifies if this action should come before, after, or replace any previously defined actions. The final option determines, in the case where more than two objects are selected, if the first selected object controls all the other selected objects or if the last selected object is controlled by actions on all the other selected objects.
New in v0.48.
This extension facilitates slicing a drawing into rectangular bitmaps for use in Web pages. It will optionally export CSS and HTML code for use with the bitmaps.
There are two steps in using this extension. First, the Create a slicer rectangle dialog is used to define a set of named rectangles for the areas that are to be exported. Each rectangle can specify a different target format (PNG, JPEG, or GIF) and optionally, a background color. The rectangles are stored in a separate Layer named Web Slicer. After defining the rectangles, the rectangle regions are exported using the Export layout pieces and HTML+CSS code dialog. A third dialog can be used to add attributes in the HTML.
The dialog consists of a number of entry boxes for specifying export rectangles. Note that the placement of the rectangle is not defined in this dialog. After clicking the Apply button, a partially opaque rectangle will be created. You move and resize this rectangle to cover the area that should be exported.
Name: Give a name to the export rectangle. The dialog can be used repeatedly with different names to define multiple export regions.
Format: Specify the bitmap format. Different regions can have different formats.
DPI: Resolution of bitmap.
Force dimension: Specify the exact size of the bitmap (in pixels). If specified, the DPI setting is overridden.
Background color: Background color for region. This will not be displayed by Inkscape.
Three tabs allow additional parameters to be specified. Note that the HTML tab specifies attributes that apply to the export rectangle.
This dialog allows you to specify where the output files should be stored and if HTML and CSS code should be produced. Note that the HTML and CSS code is not intended to be the final product but instead allows you to quickly check the output and to generate code that can be pasted into other files. Clicking the Apply button does the actual export.
This dialog allows you to set attributes that apply to the HTML and CSS that apply to the group of bitmaps exported. At least one of the Slicer rectangles must be selected in order to set these attributes.
![]() | Note |
---|---|
All of the attributes applied to the rectangles and HTML export are stored in <svg:desc> tags. These tags are not easy to edit via the XML Editor dialog. It may be easier to edit the SVG file in a text editor. |
© 2005-2017 Tavmjong Bah.![]() | ![]() |