Revision [365]

Last edited on 2011-05-26 17:44:53 by ShinOne
Additions:
You may declare styles within a style tag anywhere inside a //composer// node of your SMXML. It makes sense to declare styles before the UI elements they are being applied on so by the time SMAF gets to render the UI element the style has already been registered. All style declarations must appear as child nodes of a
Deletions:



Revision [291]

Edited on 2011-03-07 15:19:48 by ShinOne
Additions:
{{flash url="http://samplemath.com/smxml/bin/smxml.swf?url=http://samplemath.com/smxml/example/style.smxml" [width="640"] [height="160"] }}
Deletions:
{{flash url="http://samplemath.com/smaf/viewer/bin/smxml.swf?smxml=%3C%21DOCTYPE%20composer%20SYSTEM%20%22http%3A%2F%2Fsamplemath.com%2Fsmaf%2Fsmxml.dtd%22%3E%0A%3Ccomposer%3E%0A%20%09%3Cstyle%3E%0A%09%09%3Cfill%20style%3D%22sampleFill%22%20type%3D%22solid%22%3E%0A%09%09%09%3Ccolor%20alpha%3D%22.95%22%20ratio%3D%220%22%3E0xff0000%3C%2Fcolor%3E%0A%09%09%3C%2Ffill%3E%0A%20%09%3C%2Fstyle%3E%0A%09%3Cbox%20id%3D%22background%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20alpha%3D%22.1%22%20rounded%3D%2224%22%2F%3E%0A%09%3Cbox%20width%3D%22200%22%20height%3D%22100%22%20x%3D%22230%22%20y%3D%2230%22%20fill%3D%22sampleFill%22%2F%3E%0A%3C%2Fcomposer%3E" [width="640"] [height="160"] }}


Revision [150]

Edited on 2011-02-01 17:25:19 by ShinOne
Additions:
====Applying styles====
You may and should apply one style on many components. There may be more styles applied on one component but they should always be only style of a certain type applied at a time. For example there may be both a //stroke// and a //fill// style applied on a //box// but there may never be two of the same kind.


Revision [149]

Edited on 2011-02-01 17:18:26 by ShinOne
Additions:
All style declarations must also have a //style// attribute. The value of which is the unique style ID. You apply stlyles by referencing their unique style ID. In the example below we apply the //sampleFill// fill style on a //box// component by setting its //fill// attribute to '//sampleFill//'. Each type of style has its own corresponding attribute name. See the style documentation for more details.
Deletions:
All style declarations must also have a //style// attribute. The value of which is the unique style ID. You apply stlyles by referencing their unique style ID. In the example below we apply the //sampleFill// fill style on a //box// component by setting its //fill// attribute to '//sampleFill//'.


Revision [148]

Edited on 2011-02-01 17:16:51 by ShinOne
Additions:
All style declarations must also have a //style// attribute. The value of which is the unique style ID. You apply stlyles by referencing their unique style ID. In the example below we apply the //sampleFill// fill style on a //box// component by setting its //fill// attribute to '//sampleFill//'.


Revision [146]

The oldest known version of this page was created on 2011-02-01 17:12:30 by ShinOne [Cloned from DeclaringStyles]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki