Child pages
  • Shapes - an introductory MPS tutorial

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Then insert a COPY_SRCL macro to loop through all the shapes of a Canvas and trigger their reduction rules:

Reduction rules for Square and Circle also need to be created:

Image Added

Image Added

The templates for Circle and Square must hold an XmlElement as their root:

Image Added

Then the xml template must be built:

Image Added

template fragment must be created around the whole xml code:

Image Added

Image Added

The TF symbols indicate the template fragment:

Image Added

Property macros should be used to parametrize the template:

Image Added

The property macro must be further specified in the Inspector so that the correct value is used and converted from integer to string:

Image Added

The same must be repeated for the y xml attribute.

For radius, we will use a dedicated xml element:

Image Added

Image Added

And quire similar for the color:

Image Added

The template for Square will be very similar:

Image Added

Image Added

Image Added

What to do next

Congratulations! You've just completed your introductory tutorial into MPS.

...