<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://dev.eiffel.com/index.php?action=history&amp;feed=atom&amp;title=Matrix_Pixmap_Configuration_Files</id>
		<title>Matrix Pixmap Configuration Files - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://dev.eiffel.com/index.php?action=history&amp;feed=atom&amp;title=Matrix_Pixmap_Configuration_Files"/>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Matrix_Pixmap_Configuration_Files&amp;action=history"/>
		<updated>2026-04-07T16:52:31Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Matrix_Pixmap_Configuration_Files&amp;diff=11262&amp;oldid=prev</id>
		<title>Paulb at 23:47, 26 June 2008</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Matrix_Pixmap_Configuration_Files&amp;diff=11262&amp;oldid=prev"/>
				<updated>2008-06-26T23:47:46Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{UnderConstruction}}&lt;br /&gt;
The Eiffel Matrix Code Generator (emcgen) is a tool that can be used to generate an Eiffel class that permits named access, through Eiffel code, to icons on a [[Icon Resources# Icons, Pixmaps, Pixel Buffers and Matrices |matrix pixmap]. The matrix pixmap is not required to generate the Eiffel code, only the configuration file as described here.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
Matrix pixmaps configuration files are INI file detailing information of an associated matrix pixmap file, including dimensions, icon names and output options for the [[Eiffel Matrix Code Generator|emcgen]] tool.&lt;br /&gt;
&lt;br /&gt;
=== Basic Properties ===&lt;br /&gt;
All configuration files must contain the following properties, in the default section (top of the document). Failure to exclude any of one of the following properties, or to incorrectly declare their values will result in an error:&lt;br /&gt;
&lt;br /&gt;
* '''pixel_width''': Matrix icon width in pixels. So for 16x16 icons this would be 16.&lt;br /&gt;
* '''pixel_height''': Matrix icon height in pixels. So for 16x16 icons this would be 16.&lt;br /&gt;
* '''width''': Matrix width in the number of icon slots, *not* pixels.&lt;br /&gt;
* '''height''': Matrix height in the number of icon slots, *not* pixels.&lt;br /&gt;
&lt;br /&gt;
=== Addition Properties ===&lt;br /&gt;
There are also additional properties to declare &lt;br /&gt;
Optional 'name' and 'suffix' properties can be set to indicate the name of the generate class and its contained&lt;br /&gt;
features. The 'name' property can be set or overridden via the '-class' command-line switch.&lt;br /&gt;
&lt;br /&gt;
name        : Name of the class to generate&lt;br /&gt;
              Note: If an invalid Eiffel class name is specified the name will be formatted.&lt;br /&gt;
&lt;br /&gt;
suffix      : Suffix to give generated feature names&lt;br /&gt;
              Note: If an invalid Eiffel feature name suffix is specified the suffix will be formatted.&lt;br /&gt;
&lt;br /&gt;
{{Recommended|Alway specify the property '''name''', and have the class name prefixed ES_ and suffixed ICONS_X where X is the squared dimension. Currently, EiffelStudio's icon accessor classes are ill-named and will likely change in the near future.}}&lt;br /&gt;
&lt;br /&gt;
The following is the header of a configuration file for 16 by 16 pixel icons on a matrix that has a 4 icon rows and 10 icon columns.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# My icon file&lt;br /&gt;
&lt;br /&gt;
name=ES_MY_ICONS_16&lt;br /&gt;
pixel_width=16&lt;br /&gt;
pixel_height=16&lt;br /&gt;
width=10&lt;br /&gt;
height=4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.3 Sections&lt;br /&gt;
------------&lt;br /&gt;
INI sections are used for two purposes. (1) To prefix generate pixmap access feature names and (2) to skip to &lt;br /&gt;
the next line on the matrix.&lt;br /&gt;
&lt;br /&gt;
As an example:&lt;br /&gt;
&lt;br /&gt;
  [section name]&lt;br /&gt;
  icon1&lt;br /&gt;
  icon2&lt;br /&gt;
&lt;br /&gt;
  [new section]&lt;br /&gt;
  icon3&lt;br /&gt;
&lt;br /&gt;
Will generate features:&lt;br /&gt;
&lt;br /&gt;
  section_name_icon1_icon: EV_PIXMAP... -- Icon at line 1 column 1&lt;br /&gt;
  section_name_icon2_icon: EV_PIXMAP... -- Icon at line 1 column 2&lt;br /&gt;
  new_section_icon3_icon: EV_PIXMAP...  -- Icon at line 2 column 1&lt;br /&gt;
&lt;br /&gt;
Given that a section will skip to the next line, it's foreseeable that you might want to prefix feature names with&lt;br /&gt;
a different prefix but continue on the current line. These come in the form of &amp;quot;continuation sections&amp;quot;, which are&lt;br /&gt;
section's whose labels a prefixed with an '@' symbol.&lt;br /&gt;
&lt;br /&gt;
As an example:&lt;br /&gt;
&lt;br /&gt;
  [section name]&lt;br /&gt;
  icon1&lt;br /&gt;
  icon2&lt;br /&gt;
  &lt;br /&gt;
  [@continued]&lt;br /&gt;
  icon3&lt;br /&gt;
  icon4&lt;br /&gt;
&lt;br /&gt;
Will generate features:&lt;br /&gt;
&lt;br /&gt;
  section_name_icon1_icon: EV_PIXMAP...   -- Icon at line 1 column 1&lt;br /&gt;
  section_name_icon2_icon: EV_PIXMAP...   -- Icon at line 1 column 2&lt;br /&gt;
  continued_name_icon3_icon: EV_PIXMAP... -- Icon at line 1 column 3&lt;br /&gt;
  continued_name_icon4_icon: EV_PIXMAP... -- Icon at line 1 column 5&lt;br /&gt;
&lt;br /&gt;
2.3 Example&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
; Pixmap code generation ini file.&lt;br /&gt;
&lt;br /&gt;
class_name=TEST&lt;br /&gt;
pixel_width=16&lt;br /&gt;
pixel_height=16&lt;br /&gt;
width=6&lt;br /&gt;
height=6&lt;br /&gt;
&lt;br /&gt;
[icons]&lt;br /&gt;
drop feature&lt;br /&gt;
hand&lt;br /&gt;
&lt;br /&gt;
[compiler state]&lt;br /&gt;
error&lt;br /&gt;
success&lt;br /&gt;
&lt;br /&gt;
[@compilation]&lt;br /&gt;
melt&lt;br /&gt;
compile&lt;br /&gt;
&lt;br /&gt;
== Frame Files ===&lt;br /&gt;
Next to the emcgen tool there should be a frames folder. This, be default, contains a single frame file. Frame files&lt;br /&gt;
are the template files that will be used to generate the Eiffel class.&lt;br /&gt;
&lt;br /&gt;
If you have a custom frame file you want to use the specify it's location using the -frame command-line switch.&lt;br /&gt;
&lt;br /&gt;
3.1 Frame Variables&lt;br /&gt;
-------------------&lt;br /&gt;
There are a number of frame file variables that are replaced with emcgen generated code. These variables should&lt;br /&gt;
be used in your frame files to function correctly. The following list details:&lt;br /&gt;
&lt;br /&gt;
  ${NAME}          : Class name.&lt;br /&gt;
  ${ACCESS}        : Generated pixmap access features.&lt;br /&gt;
  ${IMPLEMENTATION}: Generated implementation features.&lt;br /&gt;
  ${PIXEL_WIDTH}   : Width, in pixels, of a single matrix tile.&lt;br /&gt;
  ${PIXEL_HEIGHT}  : Height, in pixels, of a single matrix tile.&lt;br /&gt;
  ${WIDTH}         : Width, in tiles, of the matrix.&lt;br /&gt;
  ${HEIGHT}        : Height, in tiles, of the matrix.&lt;br /&gt;
&lt;br /&gt;
3.2 Custom Frame Variables&lt;br /&gt;
--------------------------&lt;br /&gt;
It's possible to define custom frame variable that can change between INI configuration files. To do this, simply add a named property&lt;br /&gt;
in the form of:&lt;br /&gt;
&lt;br /&gt;
  name=value&lt;br /&gt;
&lt;br /&gt;
after the require configuration property declaration (such as 'pixel_height', etc.)&lt;br /&gt;
&lt;br /&gt;
Note: name, access, implementation, pixel_width, pixel_height, width and height have special meaning. If you try to set these your&lt;br /&gt;
generated Eiffel class may not appear as it should.&lt;br /&gt;
&lt;br /&gt;
To use the custom variables in your frame file use a ${NAME}, where NAME is the upper-cased version of your property name.&lt;br /&gt;
&lt;br /&gt;
4.0 Matrix Pixmaps&lt;br /&gt;
------------------&lt;br /&gt;
Matrix pixmaps must be created in a desired fashion, in order to be read correctly (unless you have your own frame&lt;br /&gt;
file implementation - See Section 5.0).&lt;br /&gt;
&lt;br /&gt;
Using the default frame template file, matrix pixmaps must be bordered by one pixel and each tile padded with a&lt;br /&gt;
single pixel. This is to allow the use of a matrix grid that does not interfere with any of the tiles. This is&lt;br /&gt;
what tools, such as EiffelStudio, use.&lt;br /&gt;
&lt;br /&gt;
5.0 Command-Line Options&lt;br /&gt;
------------------------&lt;br /&gt;
&lt;br /&gt;
There are number of command-line options, please use&lt;br /&gt;
&lt;br /&gt;
  emcgen /?&lt;br /&gt;
&lt;br /&gt;
for more information.&lt;/div&gt;</summary>
		<author><name>Paulb</name></author>	</entry>

	</feed>