31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

#include <br />

#include <br />

using namespace leda;<br />

class attr_update : public geowin_update<br />

{<br />

void update(const list& L, list& C)<br />

{<br />

GeoWin* GW_ptr = GeoWin::get_call_geowin();<br />

GeoBaseScene* aec =<br />

(GeoBaseScene*) GeoWin::get_call_scene();<br />

}<br />

}<br />

};<br />

C.clear();<br />

if (! L.empty()) {<br />

ALL_EMPTY_CIRCLES(L,C);<br />

// now set some attributes<br />

list::iterator it = C.begin();<br />

int cw=0;<br />

for(;it!=C.end();it++) {<br />

GW_ptr->set_obj_fill_color(aec,it,color(cw % 15));<br />

GW_ptr->set_obj_color(aec,it,color(cw % 10));<br />

cw++;<br />

}<br />

int main()<br />

{<br />

GeoWin GW("All empty circles - object attribute test");<br />

}<br />

list L;<br />

geo_scene input = GW.new_scene(L);<br />

GW.set_point_style(input, disc_point);<br />

attr_update aec_help;<br />

geo_scene aec = GW.new_scene(aec_help, input, string("All empty circles"));<br />

GW.set_all_visible(true);<br />

GW.edit(input);<br />

return 0;<br />

template <br />

color GW.get obj color(GeoBaseScene ∗ sc, void ∗ adr)<br />

returns the boundary color of the object at (∗adr).<br />

template <br />

color GW.get obj color(GeoBaseScene ∗ sc, typename T :: iterator it)<br />

template <br />

returns the boundary color of the object it points to.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!