• ↖ Home
  • Developer´s Guide
    • ↑ Contents
    • Code
    • Embedding
    • Tcl
    • SVG
    • SVG-Import
    • Projects
    • License
    • Index
  • Download
    • Jeszra: Source Code

    • Ruby Wrapper Classes
    • Python Wrapper Classes
    • Lisp Wrapper Classes
  • Books@Lulu.com...
    • Jeszra: Design by Gestalt
    • Jeszra Library: Design by Gestalt

    • Gestalt Items
    • Runtime Library
  • Manual
    • Jeszra Book

    • Tcl Manual
    • Ruby Manual
    • Python Manual
    • Lisp Manual

    • API
  • About
imageNew
← Chapter 4. SVG- Code Generation →

Name

dumper::imageNew

Synopsis

          imageNew type \
             name properties
        

Description

Requires base64 encoded images, The image must be asked for its photo type. Only possible via filename... Only »data« is used from the »properties«.

Example 4.29. Defining an Image

<defs>
<image id="»name«" ... />
</defs>


Example 4.30. Using an Image

<use id="use_»name«" x= y= xlink:href="»name«" />


using an image does not allow for width and height! See also : vgcode.tcl resolveFileProperty: base64.

The image is otherwise dealt with at the the usage place, where the viewbox and dimensions are configured (must be so for pimage and such).

As with Tk, images are always global entities. The proper place for an image would be after the <defs/> block inside <svg/>. Then however images will have to be referenced –again. Is possible, but only for unaltered, width and height images, for »pimage« a second strategy is needed to deal with these images.

Clients

imageNew is being used by ::vgcode::storeItems clients.

Example 4.31. ::vgcode::storeItems using imageNew

...
set typ \
    [lindex \
    [array get _items type,$param] 1];
if {\
    [lsearch -exact \
    [getSettings Code,Ignore,Images,List {}] $param] <= 0} {

append result \
    [dumper::imageNew $typ $param   \
    [lindex \
    [array get _items $nam] 1]]
   



← ↖ →
clipzinc ↑ canvasNew
SourceForge Logo

Copyright © 2009–2010 Arndt Roger Schneider