Hi Igor,

The new functions are:
virtual void drawPolygon( const std::vector<std::pair<float,float> > &cds )
= 0;
virtual void drawEllipse( const std::pair<float,float> &cds1 ,const
std::pair<float,float> &cds2 );

I've done drawPolygon() already but haven't tested it. The second does not
*need* to be implemented (there is code that simulates it if it's not
present), but it certainly makes things faster if it's there.

The other change that would need to be made is to support the toggling of
filled polygons in drawPolygon, drawTriangle, and drawEllipse. Here's how
the cairo drawer handles it:
https://github.com/rdkit/rdkit/blob/Issue417/Code/GraphMol/MolDraw2D/MolDraw2DCairo.cpp#L77

-greg

On Wed, Jan 28, 2015 at 2:41 PM, Igor Filippov <igor.v.filip...@gmail.com>
wrote:

> Greg,
>
> Sure, no problem - I have a code for PNG drawer already, I can get it to
> you.
> Are there prototypes (declarations) for the new functions already
> available? If so, I can take a look how easy it is to translate to
> wxWidgets api.
>
> Igor
>
> On Wed, Jan 28, 2015 at 12:17 AM, Greg Landrum <greg.land...@gmail.com>
> wrote:
>
>> Dear all,
>>
>> I created an issue to track some enhancements I want to make to the C++
>> 2D drawing API:
>> https://github.com/rdkit/rdkit/issues/417
>>
>> I'm doing the changes themselves on this branch;
>> https://github.com/rdkit/rdkit/tree/Issue417
>>
>> Here's the current state:
>> - [x] add drawPolygon()  Mandatory in canvas
>> - [ ] add drawCurve()  Optional in canvas
>> - [x] add drawEllipse()  Optional in canvas
>> - [ ] add drawRect()  Optional in canvas
>> - [x] add setLineWidth()
>> - [x] move draw commands to public interface
>> - [ ] support specification of a particular conformer for drawing
>> - [x] make fills optional for closed shapes
>>
>> I haven't added support for the optional fills in the wx drawer. Igor: if
>> you have time to do this and, ideally, add a test to the test1.cpp file
>> that uses wx to create PNGs (so it's easier to verify future changes) I'd
>> really appreciate it.
>>
>> I'd love feedback or suggestions for further enhancements.
>> -greg
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>> your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Rdkit-devel mailing list
>> Rdkit-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-devel
>>
>>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Rdkit-devel mailing list
Rdkit-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-devel

Reply via email to