*** empty log message ***

This commit is contained in:
Geert-Jan Giezeman 2002-07-02 07:21:17 +00:00
parent 1e95957b24
commit e95daa4db6
3 changed files with 61 additions and 8 deletions

View File

@ -1,3 +1,6 @@
4.9 (2 July 2002)
+ Added fill color support for window
4.8.1 (11 April 2002)
+ Corrected typo in Traits name in Edge_const_iterator

View File

@ -1,4 +1,4 @@
// ============================================================================
// ======================================================================
//
// Copyright (c) 1997 The CGAL Consortium
//
@ -8,14 +8,12 @@
//
// ----------------------------------------------------------------------------
//
// release : $CGAL_Revision: CGAL-0.9-I-06 $
// release_date : $CGAL_Date: 1998/03/11 $
// release :
// release_date :
//
// file : include/CGAL/IO/polygon_Window_stream.h
// source :
// revision : 1.8a
// revision_date : 13 Mar 1998
// author(s) : Wieger Wesselink <wieger@cs.ruu.nl>
// author(s) : Wieger Wesselink, Geert-Jan Giezeman, Matthias Baesken
//
// coordinator : Utrecht University
// ============================================================================
@ -29,6 +27,12 @@
#ifndef CGAL_WINDOW_STREAM_POLYGON_2_H
#define CGAL_WINDOW_STREAM_POLYGON_2_H
#if defined(CGAL_USE_CGAL_WINDOW)
#include <list>
#endif
CGAL_BEGIN_NAMESPACE
template <class Traits, class Container>
@ -37,7 +41,52 @@ operator<<(Window_stream& ws,
const Polygon_2<Traits,Container> &polygon)
{
typedef typename Polygon_2<Traits,Container>::Edge_const_circulator EI;
typedef typename Traits::Point_2 Point_2;
EI e = polygon.edges_circulator();
#if defined(CGAL_USE_CGAL_WINDOW)
CGAL::color cl = ws.get_fill_color();
if (cl != CGAL::invisible) {
std::list<CGAL::window_point> LP;
if (e != NULL) {
EI end = e;
do {
Point_2 p = (*e).source();
double x = CGAL::to_double(p.x());
double y = CGAL::to_double(p.y());
LP.push_back(CGAL::window_point(x,y));
++e;
} while (e != end);
}
ws.draw_filled_polygon(LP,cl);
}
#else
leda_color cl = ws.get_fill_color();
if (cl != leda_invisible) { // draw filled polygon ...
leda_list<leda_point> LP;
if (e != NULL) {
EI end = e;
do {
Point_2 p = (*e).source();
double x = CGAL::to_double(p.x());
double y = CGAL::to_double(p.y());
LP.append(leda_point(x,y));
++e;
} while (e != end);
}
ws.draw_filled_polygon(LP,cl);
}
#endif
else {
if (e != NULL) {
EI end = e;
do {
@ -46,6 +95,8 @@ operator<<(Window_stream& ws,
++e;
} while (e != end);
}
}
return ws;
}
@ -53,4 +104,3 @@ CGAL_END_NAMESPACE
#endif // CGAL_WINDOW_STREAM_POLYGON_2_H
#endif // CGAL_POLYGON_2_H

View File

@ -1 +1 @@
4.8.1 (11 Apr 2002)
4.9 ( 2 Jul 2002)