User Tools

Site Tools


readme:v11.0:paint-event-model

Redefined Paint Events Model

Documentation | What's new & coming | v11.0

Viewer drawing model has been significantly redesigned. As a result, also event raised upon drawing are different or have an altered behavior.

BeforePaintEvent

Called just before painting window. Painting area does not mean that map itself is going to be regenerated. Paint even occurs for example if dialog box laying over the map is moved. In such a situation, pure painting from the cache can occur.

This event passes platform dependent context.

This event should be avoided and BeforePaintRendererEvent should be used instead.

AfterPaintEvent

Called just after painting window.

This event passes platform dependent context.

This event should be avoided and AfterPaintRendererEvent should be used instead.

BeforePaintRendererEvent

Called just before painting window. Painting area does not mean that map itself is going to be regenerated. Paint even occurs for example if dialog box laying over the map is moved. In such a situation, pure painting from the cache can occur.

This event passes TGIS_Renderer* context.

We recommend using this event instead of BeforePaintEvent because it is faster and it uses device-independent context.

AfterPaintRendererEvent

Called just after painting window.

This event passes TGIS_Renderer* context.

We recommend using this event instead of BeforePaintEvent because it is faster and it uses device-independent context.

PaintExtraEvent

Called after painting a window. We use it to paint “dynamic” topmost layers like GPS tracking etc. By overriding this event you take a full responsibility to draw such content.

This event passes TGIS_Renderer* context.

This is context providing platform independent drawing routines. So, for example, you can implement here drawing custom rubber band selection using same interface on all platforms and languages supported by Developer Kernel

BeforeUpdateEvent

Called before actual map redraw. At this moment a cache is created and is filled with the default color

This event passes TGIS_Renderer* context.

UpdateEvent

Called upon actual map drawing. By overriding this event you take a full responsibility of calling Draw method on each layer you want to present. Generally overriding this method is not recommended unless you want to implement your own redraw logic.

This event passes TGIS_Renderer* context.

AfterUpdateEvent

Called after actual map drawing. You can use this method to add some private elements to the map.

This event passes TGIS_Renderer* context.

Java uses listeners. Actual event naming can, therefore, be slightly different

2019/12/13 09:51