KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
4D Summit: SVG in 4D
PRODUCT: 4D | VERSION: 11.3 | PLATFORM: Mac & Win
Published On: October 7, 2008
This technical article is currently restricted to 4D Summit attendees and Partners Only. Login with your Customer account to have full access to this article!!!
Log In

4D v11 SQL introduced something new to the 4D environment: support of the SVG file format for images. SVG, short for Scalable Vector Graphics, is a vector graphics file format following an XML (eXtensible Markup Language) specification. With 4D v11 SQL images described by SVG and saved as SVG or XML files can be rendered in (or saved as) picture variables or shown in the new form object: Web Area. SVG is a powerful tool that can be used to produce images that are broken down into separate objects. Each object can respond uniquely to events such as mousing over the object or clicking on it. SVG is a much more potent graphic tool than anything 4D has seen in the past, with many benefits over the standard images commonly found on the web, such as JPEG (a compression method created by the Joint Photographic Experts Group) or GIF (Graphics Interchange Format) files. 4D's XML commands can be used to create SVG files which can then be displayed with the DOM EXPORT TO PICTURE command or written to an SVG file. Because these commands can be daunting for users unfamiliar with SVG and XML 4D is developing a component that can be used to design SVG graphics in a more user friendly manner. A large part of these session notes will deal with that component its use.

Commented by Thomas Fitch on April 27, 2009 at 12:12 PM
The sample database SeatFinder included with this uses GET MOUSE command. With the changes to 4D v11 SQL the MouseX and MouseY process variables should be used instead to find the position of the mouse when using SVG Find element ID by coordinates.