Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site. Si vous continuez à utiliser ce dernier, nous considèrerons que vous acceptez l'utilisation des cookies. J'ai compris ! ou En savoir plus !.
banniere

Le portail francophone de la géomatique


Toujours pas inscrit ? Mot de passe oublié ?

Clip to layout : bibliothèque d'llustrations

Manuel en français

Utilise l'idée de “clip art” pour ajouter des objets de collections dans une mise en page

English Manual

Clip to Layout

©Jacques Paris, 25-09-01

version 1.01 28-09-01 (see latest improvements at the end)

A short history

I started thinking about such a program when I tried to handle North Arrows presented as clip art in some old MapInfo data. There was a table name JARROW.tab in a directory named Japan. The principle was simple: select an arrow from JARROW and paste it where you want.

I encountered several problems, all due to the fact that these arrows were not a single object but a collection. Making a selection was not too bad, pasting them another thing. Positioning and scaling in a layout turned up to be a rather haphazard venture with a high risk of loosing some parts in the process or of distorting the image during rescaling.

I developed a solution based on 3 elements: a way to deal with collections of basic objects (I am using “frames” around the arrows for selecting all the required objects); a way to move and resize them while respecting their aspect (I create a map and an associated frame in the layout); a way to make it easy to store (the map can be saved as such but must be present when the wor is reused, or all details of the object are pasted directly into the layout).

Then I realized that it was possible to handle any clip , not only North Arrows, but also decorative elements and even block templates. Hence its latest “name” : Clip2Layout

The "clip" library map

The clips are drawn on a NON_EARTH map in CENTIMETRES; there are no constrains on the bounds. Each clip object must be framed tightly and evenly in a rectangle. There must be a small margin, too tight a fit may result in loosing some elements or style effects on the periphery. The process starts by selecting one of those rectangles; all the elements within that rectangle will become a “clip map”.

The contents of a library does not need to be large; I would rather recommend to strive for clarity and ease of recognition. The application makes it very easy to switch between clip libraries and smaller more specialized libraries will be more effective than large confused ones.

I offer 3 libraries, all of North Arrows, Arrows01, ..02, ..03. Two are extracted from the JARROW.tab, with the addition of some variants. The third one contains the MapInfo Arrows TTF symbols that I have redrawn as vector objects.

Steps in the processing

0 - Adjust parameters if required. “Options” only available as menu item. They include:

- Window stretch parameter : Value added in CENTIMETRES to height of window for taking care of window grab bar height. Default value 0

That parameter is included in case the height of the temporary Clip Map set to the actual height of the object distorts the selected image. By using a value>0, the total height of the window is increased and the 'shortening' of the object eliminated.

- Clip size factor : Factor determining the actual size of the clip relative to original drawing. Decimal value . Default value 1

This scale factor is used to size the frame for the Clip Map relatively to the actual size of the object in the 'library' map. Irrelevant if the object is later transferred directly into the layout. The frame can be resized after display. There might be some readjustment of that value if the frame is resized.

- Clip Library map : Map from which the clip is selected. By default , 'Arrows01.map' in application directory.

A 'library' map has a NON-Earth projection in CENTIMETRES. Each 'object' is framed in a rectangle fitted tightly and evenly over it. An 'object' can be composed of several graphic objects excluding SYMBOLS and TEXTS.

- Anchor point : Anchor point (upper left corner) of clip in layout, in cm from upper left corner of layout. Default values (5,5).

Positioning of the frame for Clip Map is done by entering the coordinates of the upper left corner (anchor) or by selecting its position directly on the screen. That position is used for automatic display; the frame can be moved around afterwards.

1 - Select a clip object. Use “Select Clip” menu item or icon “Scissors” then select the FRAME of the object (not any part of the object)

2 - Place the clip. Use “Place Clip” menu item or “Plus sign” icon. A map is created of the clip; it is at least 3 cm wide (slightly larger than the minimum width for a mapper), wider if the clip measure more than 3 cm.

A frame is added to the layout in the position (X and Y of upper left corner) defined by the user and of the size of the original object, corrected by the scale factor specified in the options. There are two ways to specify the anchor point: entering the X and Y values or clicking in the layout with the MB tool.

Moving the frame around and resizing it is then possible but the new settings will not be recorded in the options.

3 - This could be the end of the operation and it is possible to save the Clip map under a different name and to register the WOR at this stage. Use “Save Map and WOR” menu item or “Diskette” icon. That solution requires that the renamed Clip map be always available for the WOR to display properly the clip object.

4 - If the “3” way above is not chosen, the user can then transfer the objects from the Clip map to the layout by using “Transfer Clip” menu item or “Pointer in windows” icon. The destination of the transferred objects will be the frame as it is located and sized. There are automatic adjustments of the scale to make sure that the object is not distorted (the scale is computed so that width or height fits exactly in the frame) and of the anchor point to centre the object in the frame.

At this point, the user is free to do what he wants with his layout.

X - At several moments in the procedure, the “Clear Clip” or “Blank Book” icon is available to clear the Clip Map.

Extension of use to template designs

I have also included a demo library containing one object, Cartouche01. Use it with Clip2Layout to see how complex template clips can be transferred. Set the anchor point at 10.5 x 21.5 cm for a standard commercial page. “Select” it, “Place” it and Transfer“ it.

One could easily imagine a complete “page” template with reserved spaces for specific frames (mapper, browser, legend) but that would require adding new functions to transform rectangles into frames (frames exist only in a layout context and cannot be as such in a clip map).

Possible developments/improvements

Between () indicates the item has been implemented, at least in part

Septembre 25, 2001

1 - possibility to work in cms AND/OR inches
2 - dealing with symbols
3 - dealing with texts, at least horizontal texts
4 - testing the real need for the stretch factor (see options)
(5) - finding a way to draw the framing rectangles more efficiently
(6) - adding automatic correction for internal margins of framing rectangle
(7) - adding the possibility to transform a rectangle in a frame once the clip has been transferred
8 - make it MLC_INI compliant (when stabilized)
9 - keep settings between sessions

Latest improvements

septembre 28, 2001

5 - finding a way to draw the framing rectangles more efficiently

An external function has been added. It can be used to draw the framing rectangles by selected the objects to be included in the clip. An extra margin of 1 mm is added on all side of the MBR of the objects. The pen style is left to the user.

6 - adding automatic correction for internal margins of framing rectangle

A change in coding makes now the positioning and scaling of the objects totally independent of the margins within the frame.

7 - adding the possibility to transform a rectangle in a frame once the clip has been transferred

An external function has been added to do that. No restriction in its use apart from requiring a rectangle drawn in a layout. It will transfer a mapper, a browser or a cartographic legend.

The map of a mapper can fill the rectangle or respect its aspect.

The rectangle to use for a browser can be fixed or adjusted to the browser size with different choices: the frame can have the same upper left corner as the rectangle, be centred on the rectangle while being aligned on its top side or centred on its centre. As
the dimensions of the browser window include the scrolling bars, they are corrected for that (a parameter that will have to externalized is presently set at .5 cm). To make sure that there will be no truncation, the user is advised to leave a narrow space between the rightmost column and the scroll bar as well as between the last row and the scroll bar.

A cartographic legend can be transferred to a rectangle=frame, but no option concerning resizing of frame and “tighter” positioning of legend frames has been coded yet.

 
main/logiciels/mapinfo/outils/clip_to_layout.txt · Dernière modification: 2009/04/15 20:59 (modification externe)
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki