Geometry Styles - Under the Covers

Simple Tools and Utils

Uncaching the Style in SWAF

Have you ever updated styles and for some reason the change didn't seem to be visible in the application? The style may not have been uncached. Use this to uncache your styles: app.get_ace_control_for(app.ace_name).uncache_styles()

Storage

Style Editor

To get to the current style editor, use the following. Note the name of the application (:admin), may be different in your specific case

smallworld_product.application(:admin).plugin(:style).sys!slot(
    :style_framework).sys!perform(:style_editor).sys!slot(:current_style_editor)

Patterns

Patterns are semi-supported. It doesn't appear to work with PDF files. But can be used in normal plotting. There are several issues with the pattern I guess this is why GE hasn't implemented them 100%.

  • The realise() method doesn't actually acknowledge the pattern information, so you need to use the following.
  • You will need to get a handle on the rwo_style and set the fillpattern by hand like.
rwo_style.actual_gis_style.fill_pattern_name << "cg.pr"
  • You then need to do an unrealise() and realise() on the actual_gis_style.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License