Sorry, my git description does not work. It works with cloning my repository 
and checking out the branch (though there must be some magic to add the branch 
to a cloned main repository).

git clone git://github.com/mhugent/Quantum-GIS.git
cd Quantum-GIS
git checkout --track origin/data_defined_symbollayer

Marco

Am Dienstag, 14. Juni 2011, 15.48:29 schrieb Marco Hugentobler:
> Hi QGIS devs
> 
> Recently, I was writing a symbollayer to render ellipse shapes (and also
> rectangles, triangles, crosses by specifying width and height). Moreover,
> the symbol layer allows to set all parameters (width, height, colors,
> rotation, outline with) from data fields, in mm or map units.
> 
> The code is contained in my github clone int the branch
> 'data_defined_symbollayer'. To give it a try, you can do the following:
> 
> git add remote add mhugent git://github.com/mhugent/Quantum-GIS.git
> git checkout --track mhugent/data_defined_symbollayer
> 
> The reason it's in a branch is that data defined rendering in symbol layers
> needed some API changes. They are quite small:
> 
> - A pointer to the rendered QgsFeature* has been added to
> QgsSymbolV2RenderContext (such that the symbollayer has the possibility to
> check the data defined attribute values)
> 
> - A symbollayer has the possibility to specify which attribute fields it
> needs for rendering (by default, QgsSymbolLayerV2::usedAttributes returns
> an empty set).
> 
> - The symbollayer widgets receive a pointer to their vector layer. Normal
> symbol layer widgets don't use it, the widgets of  data defined symbol
> layers get the available fields through that pointer.
> 
> At first, I tried to achieve the data defined layer without API change by
> creating a new subclass of  QgsFeatureRendererV2 (as discussed with Martin
> in Lisbon. However, it turned out this approach would need a lot of
> duplication to provide graduated / unique / rule based classification and
> to provide a seamless  integration with the existing symbology(ng).
> 
> What do you think?
> 
> Regards,
> Marco


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
[email protected] http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to