2 * This program is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU Lesser General Public License as
4 * published by the Free Software Foundation, either version 3 of the
5 * License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 * @file Style2DFactory.ih
19 * @author Martial Tola <http://liris.cnrs.fr/martial.tola/>
20 * @date lundi 24 octobre 2011
24 * Implementation of inline methods defined in Style2DFactory.h
26 * This file is part of the DGtal library.
29 ///////////////////////////////////////////////////////////////////////////////
30 // Implementation of inline methods //
32 ///////////////////////////////////////////////////////////////////////////////
33 // Implementation of inline functions and external operators //
37 // DiscreteExteriorCalculus
41 struct CalculusStyle2D : public DrawableWithBoard2D
44 virtual void setStyle(Board2D & aBoard) const
46 aBoard.setPenColorRGBi(0,0,0);
47 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
48 aBoard.setFillColor(Color::None);
49 aBoard.setLineWidth(1);
52 // DiscreteExteriorCalculus
58 struct KFormStyle2D : public DrawableWithBoard2D
62 ColorGradientPreset cmap_preset;
65 KFormStyle2D(const double& _cmap_min = 0, const double& _cmap_max = 0, const ColorGradientPreset& _cmap_preset = CMAP_JET, const int& _cmap_repeat = 0)
66 : DrawableWithBoard2D(), cmap_min(_cmap_min), cmap_max(_cmap_max), cmap_preset(_cmap_preset), cmap_repeat(_cmap_repeat)
70 virtual void setStyle(Board2D & aBoard) const
72 aBoard.setPenColorRGBi(0,0,0);
73 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
74 aBoard.setFillColorRGBi(0,0,0);
75 aBoard.setLineWidth(1);
84 struct VectorFieldStyle2D : public DrawableWithBoard2D
89 VectorFieldStyle2D(const double& _scale = .25, const double& _epsilon = 1e-8)
90 : DrawableWithBoard2D(), scale(_scale), epsilon(_epsilon)
94 virtual void setStyle(Board2D& aBoard) const
96 aBoard.setPenColorRGBi(0,0,0);
97 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
98 aBoard.setFillColorRGBi(0,0,0);
99 aBoard.setLineWidth(1);
105 // AngleLinearMinimizer
109 struct DefaultDrawStyleCircular_AngleLinearMinimizer : public DrawableWithBoard2D
111 virtual void setStyle( Board2D & aBoard ) const
113 aBoard.setPenColorRGBi(160,160,160);
114 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
115 aBoard.setFillColorRGBi(220,220,220);
116 aBoard.setLineWidth(1);
119 // AngleLinearMinimizer
124 * Default style for the bounding box mode.
126 struct DefaultDrawStyleBB_ArithmeticalDSS : public DrawableWithBoard2D
129 * Draw the DSS on a board
130 * @param aBoard the output board where the object is drawn.
132 virtual void setStyle(Board2D & aBoard) const
135 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
136 aBoard.setPenColor(Color::Red);
137 aBoard.setLineWidth(1);
138 aBoard.setFillColor(Color::None);
142 * Default style for the points mode.
144 struct DefaultDrawStylePoints_ArithmeticalDSS : public DrawableWithBoard2D
147 * Draw the DSS on a board
148 * @param aBoard the output board where the object is drawn.
150 virtual void setStyle(Board2D & aBoard) const
153 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
154 aBoard.setPenColor(Color::Black);
155 aBoard.setLineWidth(2);
156 aBoard.setFillColor(Color::None);
162 // ArithmeticalDSSComputer
164 * Default style for the bounding box mode.
166 struct DefaultDrawStyleBB_ArithmeticalDSSComputer : public DrawableWithBoard2D
169 * Draw the DSS on a board
170 * @param aBoard the output board where the object is drawn.
172 virtual void setStyle(Board2D & aBoard) const
175 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
176 aBoard.setPenColor(Color::Red);
177 aBoard.setLineWidth(1);
178 aBoard.setFillColor(Color::None);
182 * Default style for the points mode.
184 struct DefaultDrawStylePoints_ArithmeticalDSSComputer : public DrawableWithBoard2D
187 * Draw the DSS on a board
188 * @param aBoard the output board where the object is drawn.
190 virtual void setStyle(Board2D & aBoard) const
193 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
194 aBoard.setPenColor(Color::Black);
195 aBoard.setLineWidth(2);
196 aBoard.setFillColor(Color::None);
199 // ArithmeticalDSSComputer
202 // AlphaThickSegmentComputer
205 * Default style for the bounding box mode.
207 struct DefaultDrawStyleBB_AlphaThickSegmentComputer : public DrawableWithBoard2D
210 * Draw the AlphaThickSegmentComputer on a board
211 * @param aBoard the output board where the object is drawn.
213 virtual void setStyle(Board2D & aBoard) const
216 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
217 aBoard.setPenColor(Color::Red);
218 aBoard.setLineWidth(5);
219 aBoard.setFillColor(Color::None);
224 * Default style for the points mode.
226 struct DefaultDrawStylePoints_AlphaThickSegmentComputer : public DrawableWithBoard2D
229 * Draw the AlphaThickSegmentComputer on a board
230 * @param aBoard the output board where the object is drawn.
232 virtual void setStyle(Board2D & aBoard) const
235 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
236 aBoard.setPenColor(Color::Black);
237 aBoard.setLineWidth(2);
238 aBoard.setFillColor(Color::None);
242 // AlphaThickSegmentComputer
245 // DigitalSetBySTLSet
249 struct DefaultDrawStyle_DigitalSetBySTLSet : public DrawableWithBoard2D
251 virtual void setStyle(Board2D & aBoard) const
253 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
254 aBoard.setFillColorRGBi(160,160,160);
255 aBoard.setPenColorRGBi(80,80,80);
258 // DigitalSetBySTLSet
260 // DigitalSetByAssociativeContainer
264 struct DefaultDrawStyle_DigitalSetByAssociativeContainer : public DrawableWithBoard2D
266 virtual void setStyle(Board2D & aBoard) const
268 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
269 aBoard.setFillColorRGBi(160,160,160);
270 aBoard.setPenColorRGBi(80,80,80);
273 // DigitalSetByAssociativeContainer
276 // DigitalSetBySTLVector
280 struct DefaultDrawStyle_DigitalSetBySTLVector : public DrawableWithBoard2D
282 virtual void setStyle(Board2D & aBoard) const
284 aBoard.setLineWidth(1);
285 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
286 aBoard.setFillColorRGBi(160,160,160);
287 aBoard.setPenColorRGBi(80,80,80);
290 // DigitalSetBySTLVector
297 struct DefaultDrawStyle_FP : public DrawableWithBoard2D
301 * @param aBoard the output board where the object is drawn.
303 virtual void setStyle(Board2D & aBoard) const
306 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
307 aBoard.setPenColor(Color::Red);
308 aBoard.setLineWidth(2);
309 aBoard.setFillColor(Color::None);
316 struct DefaultDrawStyleGrid_FreemanChain : public DrawableWithBoard2D
318 virtual void setStyle( Board2D & aBoard ) const
320 aBoard.setLineStyle (LibBoard::Shape::SolidStyle );
321 aBoard.setFillColor(Color::None);
325 struct DefaultDrawStyleInterGrid_FreemanChain : public DrawableWithBoard2D
327 virtual void setStyle( Board2D & aBoard ) const
329 aBoard.setLineStyle (LibBoard::Shape::SolidStyle );
330 aBoard.setFillColor(Color::None);
336 // StabbingLineComputer
338 * Default drawing style for StabbingLineComputer.
340 struct DefaultDrawStyle_StabbingLineComputer : public DrawableWithBoard2D
343 * Draw the StabbingLineComputer on a board
344 * @param aBoard the output board where the object is drawn.
346 virtual void setStyle(Board2D & aBoard) const
348 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
349 aBoard.setPenColor(Color::Red);
350 aBoard.setLineWidth(1.5);
351 aBoard.setFillColor(Color::None);
354 // StabbingLineComputer
356 //StabbingCircleComputer
358 * Default drawing style for StabbingCircleComputer.
360 struct DefaultDrawStyle_StabbingCircleComputer : public DrawableWithBoard2D
363 * Draw the StabbingCircleComputer on a board
364 * @param aBoard the output board where the object is drawn.
366 virtual void setStyle(Board2D & aBoard) const
368 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
369 aBoard.setPenColor(Color::Red);
370 aBoard.setLineWidth(1.5);
371 aBoard.setFillColor(Color::None);
374 // StabbingCircleComputer
379 * Default drawing style for FrechetShortcut.
381 struct DefaultDrawStyle_FrechetShortcut : public DrawableWithBoard2D
384 * Draw the FrechetShortcut on a board
385 * @param aBoard the output board where the object is drawn.
387 virtual void setStyle(Board2D & aBoard) const
389 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
390 aBoard.setPenColor(Color::Red);
391 aBoard.setLineWidth(1.5);
392 aBoard.setFillColor(Color::None);
399 // we use friend because of inner classes
407 struct DefaultDrawStylePaving_HyperRectDomain : public DrawableWithBoard2D
409 virtual void setStyle(Board2D & aBoard) const
411 aBoard.setPenColorRGBi(160, 160, 160);
412 aBoard.setFillColorRGBi(255, 255, 255);
413 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
414 aBoard.setLineWidth( 1 );
419 * Default style.aultDrawStyleTransparent_LatticePol
421 struct DefaultDrawStyleGrid_HyperRectDomain : public DrawableWithBoard2D
423 virtual void setStyle(Board2D & aBoard) const
425 aBoard.setPenColorRGBi(160, 160, 160);
426 aBoard.setFillColorRGBi(160, 160, 160);
427 aBoard.setLineStyle(Board2D::Shape::DashStyle);
428 aBoard.setLineWidth( 1 );
434 // ImageContainerByHashTree
435 struct DefaultDrawStyle_ImageContainerByHashTree : public DrawableWithBoard2D
437 virtual void setStyle(Board2D & aboard) const
439 aboard.setPenColorRGBi(60, 60, 60);
440 aboard.setLineStyle(Board2D::Shape::SolidStyle);
443 // ImageContainerByHashTreeaultDrawStyleTransparent_LatticePol
446 // ImageContainerBySTLVector
450 struct DefaultDrawStyle_ImageContainerBySTLVector : public DrawableWithBoard2D
452 virtual void setStyle( Board2D & aBoard ) const
454 aBoard.setPenColorRGBi(60, 60, 60);
455 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
458 // ImageContainerBySTLVector
461 // KhalimskyCellaultDrawStyleTransparent_LatticePol
465 struct DefaultDrawStyle_KhalimskyCell : public DrawableWithBoard2D
467 virtual void setStyle( Board2D & aBoard ) const
469 aBoard.setPenColorRGBi( 50, 50, 50 );
470 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
471 aBoard.setFillColorRGBi( 80, 80, 80 );
472 aBoard.setLineWidth( 1 );
482 struct DefaultDrawStyle_Object : public DrawableWithBoard2D
484 virtual void setStyle(Board2D & aBoard) const
486 // line width decreased to avoid too large arrows to display adjacency.
487 aBoard.setLineWidth(0.75);
488 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
489 aBoard.setFillColorRGBi(160, 160, 160);
490 aBoard.setPenColorRGBi(80, 80, 80);
497 * Default style for CubicalComplex.
499 struct DefaultDrawStyle_CubicalComplex : public DrawableWithBoard2D
501 virtual void setStyle(Board2D & aBoard) const
503 // line width decreased to avoid too large arrows to display adjacency.
504 aBoard.setLineWidth(0.75);
505 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
506 aBoard.setFillColorRGBi(200, 200, 200);
507 aBoard.setPenColorRGBi(0, 0, 0);
517 struct DefaultDrawStylePaving_PointVector : public DrawableWithBoard2D
519 virtual void setStyle( Board2D & aBoard ) const
521 aBoard.setPenColorRGBi(160,160,160);
522 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
523 aBoard.setFillColorRGBi(220,220,220);
524 aBoard.setLineWidth(1);
529 * Style based in grid representation.
531 struct DefaultDrawStyleGrid_PointVector : public DrawableWithBoard2D
533 virtual void setStyle( Board2D & aBoard ) const
535 aBoard.setPenColor(Color::Black);
536 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
546 // SignedKhalimskyCell
550 struct DefaultDrawStyle_SignedKhalimskyCell : public DrawableWithBoard2D
552 virtual void setStyle( Board2D & aBoard ) const
554 aBoard.setPenColorRGBi( 50, 50, 50 );
555 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
556 aBoard.setFillColorRGBi( 80, 80, 80 );
557 aBoard.setLineWidth( 1 );
560 // SignedKhalimskyCell
563 struct DefaultDrawStyleFilled_LatticePolytope2D : public DrawableWithBoard2D
565 virtual void setStyle( Board2D & aBoard ) const
567 aBoard.setPenColorRGBi( 30, 30, 30 );
568 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
569 aBoard.setFillColorRGBi( 200, 200, 200 );
570 aBoard.setLineWidth( 2 );
573 struct DefaultDrawStyleTransparent_LatticePolytope2D : public DrawableWithBoard2D
575 virtual void setStyle( Board2D & aBoard ) const
577 aBoard.setPenColorRGBi( 30, 30, 30 );
578 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
579 aBoard.setFillColor( DGtal::Color::None ); //200, 200, 200 );
580 aBoard.setLineWidth( 2 );
586 // StraightLineFrom2Points
587 // StraightLineFrom2Points
595 // DiscreteExteriorCalculus
596 template <DGtal::Dimension dimEmbedded, DGtal::Dimension dimAmbient, typename TLinearAlgebraBackend, typename TInteger>
598 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DiscreteExteriorCalculus<dimEmbedded, dimAmbient, TLinearAlgebraBackend, TInteger>& /*object*/, std::string /*mode*/ = "" )
600 return new DGtal::CalculusStyle2D();
602 // DiscreteExteriorCalculus
605 template <typename TCalculus, DGtal::Order order, DGtal::Duality duality>
607 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::KForm<TCalculus, order, duality>& object, std::string mode = "" )
609 boost::ignore_unused_variable_warning( mode );
610 boost::ignore_unused_variable_warning( object );
611 return new DGtal::KFormStyle2D();
616 template <typename TCalculus, DGtal::Duality duality>
618 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::VectorField<TCalculus, duality>& /*object*/, std::string /*mode*/ = "" )
620 return new DGtal::VectorFieldStyle2D();
624 // AngleLinearMinimizer
626 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::AngleLinearMinimizer & /*a*/, std::string mode = "" )
628 boost::ignore_unused_variable_warning(mode);
629 //only one style actually...
630 return new DGtal::DefaultDrawStyleCircular_AngleLinearMinimizer;
632 // AngleLinearMinimizer
635 template <typename TCoordinate, typename TInteger, unsigned short adjacency>
637 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::ArithmeticalDSS<TCoordinate,TInteger,adjacency> & /*a*/, std::string mode = "" )
639 if ( ( mode == "" ) || ( mode == "BoundingBox" ) )
640 return new DGtal::DefaultDrawStyleBB_ArithmeticalDSS;
641 else // mode == "Points"
642 return new DGtal::DefaultDrawStylePoints_ArithmeticalDSS;
646 // ArithmeticalDSSComputer
647 template <typename TIterator, typename TInteger, int connectivity>
649 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::ArithmeticalDSSComputer<TIterator,TInteger,connectivity> & /*a*/, std::string mode = "" )
651 if ( ( mode == "" ) || ( mode == "BoundingBox" ) )
652 return new DGtal::DefaultDrawStyleBB_ArithmeticalDSSComputer;
653 else // mode == "Points"
654 return new DGtal::DefaultDrawStylePoints_ArithmeticalDSSComputer;
656 // ArithmeticalDSSComputer
659 // AlphaThickSegmentComputer
660 template <typename TInputPoint, typename TConstIterator>
662 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::AlphaThickSegmentComputer< TInputPoint, TConstIterator> & /*a*/, std::string mode = "" )
664 if ( ( mode == "" ) || ( mode == "BoundingBox" ) )
665 return new DGtal::DefaultDrawStyleBB_AlphaThickSegmentComputer;
666 else // mode == "Points"
667 return new DGtal::DefaultDrawStylePoints_AlphaThickSegmentComputer;
669 // AlphaThickSegmentComputer
673 template <typename TPoint>
675 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CircleFrom2Points<TPoint> & /*cf2p*/, std::string mode = "" )
677 boost::ignore_unused_variable_warning(mode);
678 return new DGtal::DrawableWithBoard2D;
684 template <typename TPoint>
686 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CircleFrom3Points<TPoint> & /*cf3p*/, std::string mode = "" )
688 boost::ignore_unused_variable_warning(mode);
689 return new DGtal::DrawableWithBoard2D;
694 // DigitalSetBySTLSet
695 template<typename Domain, typename Compare>
697 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DigitalSetBySTLSet<Domain, Compare> & /*s*/, std::string mode = "" )
699 boost::ignore_unused_variable_warning(mode);
700 return new DGtal::DefaultDrawStyle_DigitalSetBySTLSet;
702 // DigitalSetBySTLSet
704 // DigitalSetByAssociativeContainer
705 template<typename Domain, typename Container>
707 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DigitalSetByAssociativeContainer<Domain, Container> & /*s*/,
708 std::string mode = "" )
710 boost::ignore_unused_variable_warning(mode);
711 return new DGtal::DefaultDrawStyle_DigitalSetByAssociativeContainer;
713 // DigitalSetBySTLSet
715 // DigitalSetBySTLVector
716 template<typename Domain>
718 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DigitalSetBySTLVector<Domain> & /*v*/, std::string mode = "" )
720 boost::ignore_unused_variable_warning(mode);
721 return new DGtal::DefaultDrawStyle_DigitalSetBySTLVector;
723 // DigitalSetBySTLVector
727 template <typename TIterator, typename TInteger, int connectivity>
729 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::FP<TIterator,TInteger,connectivity> & /*fp*/,
730 std::string mode = "" )
732 boost::ignore_unused_variable_warning( mode );
733 return new DGtal::DefaultDrawStyle_FP;
739 template <typename TInteger>
741 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::FreemanChain<TInteger> & /*f*/,
742 std::string mode = "" )
744 if ( ( mode == "" ) || ( mode == "Grid" ) )
745 return new DGtal::DefaultDrawStyleGrid_FreemanChain;
747 return new DGtal::DefaultDrawStyleInterGrid_FreemanChain;
752 // StabbingLineComputer
753 template <typename TConstIterator>
755 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::StabbingLineComputer<TConstIterator> & /*g*/,
756 std::string mode = "" )
758 boost::ignore_unused_variable_warning(mode);
759 return new DGtal::DefaultDrawStyle_StabbingLineComputer;
761 // StabbingLineComputer
763 // StabbingCircleComputer
764 template <typename TConstIterator>
766 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::StabbingCircleComputer<TConstIterator> & /*g*/,
767 std::string mode = "" )
769 boost::ignore_unused_variable_warning(mode);
770 return new DGtal::DefaultDrawStyle_StabbingCircleComputer;
772 // StabbingCircleComputer
774 // // FrechetShortcut
775 template <typename TIterator, typename TInteger>
777 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::FrechetShortcut<TIterator,TInteger> & /*f*/, std::string mode = "" )
779 boost::ignore_unused_variable_warning(mode);
780 return new DGtal::DefaultDrawStyle_FrechetShortcut;
782 // // FrechetShortcut
787 template <typename TKSpace>
788 DGtal::DrawableWithBoard2D*
789 defaultStyle(const DGtal::GridCurve<TKSpace> & /*object*/,
790 std::string mode = "" )
792 boost::ignore_unused_variable_warning(mode);
793 return new DGtal::DrawableWithBoard2D;
798 template <typename TIterator, typename TSCell>
799 DGtal::DrawableWithBoard2D*
800 defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::Identity, TSCell> & /*object*/,
801 std::string mode = "" )
803 boost::ignore_unused_variable_warning(mode);
804 return new DGtal::DrawableWithBoard2D;
809 template <typename TIterator, typename TKSpace>
810 DGtal::DrawableWithBoard2D*
811 defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToPoint<TKSpace>, typename TKSpace::Point> & /*object*/,
812 std::string mode = "" )
814 boost::ignore_unused_variable_warning(mode);
815 return new DGtal::DrawableWithBoard2D;
820 template <typename TIterator, typename TKSpace>
821 DGtal::DrawableWithBoard2D*
822 defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::CanonicSCellEmbedder<TKSpace>,
823 typename TKSpace::Space::RealPoint> & /*object*/,
824 std::string mode = "" )
826 boost::ignore_unused_variable_warning( mode );
827 return new DGtal::DrawableWithBoard2D;
832 template <typename TIterator, typename TKSpace>
833 DGtal::DrawableWithBoard2D*
834 defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToArrow<TKSpace>,
835 std::pair<typename TKSpace::Point, typename TKSpace::Vector> > & /*object*/,
836 std::string mode = "" )
838 boost::ignore_unused_variable_warning(mode);
839 return new DGtal::DrawableWithBoard2D;
844 template <typename TIterator, typename TKSpace>
845 DGtal::DrawableWithBoard2D*
846 defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToInnerPoint<TKSpace>, typename TKSpace::Point> & /*object*/,
847 std::string mode = "" )
849 boost::ignore_unused_variable_warning(mode);
850 return new DGtal::DrawableWithBoard2D;
855 template <typename TIterator, typename TKSpace>
856 DGtal::DrawableWithBoard2D*
857 defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToOuterPoint<TKSpace>, typename TKSpace::Point> & /*object*/,
858 std::string mode = "" )
860 boost::ignore_unused_variable_warning( mode );
861 return new DGtal::DrawableWithBoard2D;
865 // IncidentPointsRange
866 template <typename TIterator, typename TKSpace>
867 DGtal::DrawableWithBoard2D*
868 defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToIncidentPoints<TKSpace>,
869 std::pair<typename TKSpace::Point, typename TKSpace::Point> > & /*object*/,
870 std::string mode = "" )
872 boost::ignore_unused_variable_warning(mode);
873 return new DGtal::DrawableWithBoard2D;
875 // IncidentPointsRange
878 template<typename TSpace>
880 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::HyperRectDomain<TSpace> & /*h*/, std::string mode = "" )
882 if ( ( mode == "" ) || ( mode == "Both" ) || ( mode == "Grid" ) )
883 return new DGtal::DefaultDrawStyleGrid_HyperRectDomain;
884 else // mode == "Paving"
885 return new DGtal::DefaultDrawStylePaving_HyperRectDomain;
890 // ImageContainerByHashTree
891 template <typename Domain, typename Value, typename HashKey >
893 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::experimental::ImageContainerByHashTree<Domain, Value, HashKey > & /*icbht*/, std::string mode = "" )
895 boost::ignore_unused_variable_warning(mode);
896 return new DGtal::DefaultDrawStyle_ImageContainerByHashTree;
898 // ImageContainerByHashTree
901 // ImageContainerBySTLVector
902 template <typename D, typename V>
904 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::ImageContainerBySTLVector<D, V> & /*icbsv*/, std::string mode = "" )
906 boost::ignore_unused_variable_warning( mode );
907 return new DGtal::DefaultDrawStyle_ImageContainerBySTLVector;
909 // ImageContainerBySTLVector
913 template < DGtal::Dimension dim, typename TInteger >
915 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::KhalimskyCell<dim, TInteger> & /*k*/, std::string mode = "" )
917 boost::ignore_unused_variable_warning(mode);
918 return new DGtal::DefaultDrawStyle_KhalimskyCell;
923 template < DGtal::Dimension dim, typename TInteger >
925 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::KhalimskyPreCell<dim, TInteger> & /*k*/, std::string mode = "" )
927 boost::ignore_unused_variable_warning(mode);
928 return new DGtal::DefaultDrawStyle_KhalimskyCell;
933 template <typename TDigitalTopology, typename TDigitalSet>
935 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::Object<TDigitalTopology, TDigitalSet> & /*o*/, std::string mode = "" )
937 boost::ignore_unused_variable_warning(mode);
938 return new DGtal::DefaultDrawStyle_Object;
943 template < typename TKSpace,
944 typename TCellContainer >
946 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CubicalComplex<TKSpace, TCellContainer> & /*o*/, std::string mode = "" )
948 boost::ignore_unused_variable_warning(mode);
949 return new DGtal::DefaultDrawStyle_CubicalComplex;
955 template<DGtal::Dimension dim, typename TComponent, typename TContainer>
957 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::PointVector<dim, TComponent, TContainer> & /*p*/, std::string mode = "")
959 if ( ( mode == "" ) || ( mode == "Paving" ) )
960 return new DGtal::DefaultDrawStylePaving_PointVector;
961 else // mode == "Grid"
962 return new DGtal::DefaultDrawStyleGrid_PointVector;
968 template <typename Shape>
970 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::Preimage2D<Shape> & /*p*/, std::string mode = "")
972 boost::ignore_unused_variable_warning(mode);
973 return new DGtal::DrawableWithBoard2D;
978 // SignedKhalimskyCell
979 template < DGtal::Dimension dim, typename TInteger >
981 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::SignedKhalimskyCell<dim, TInteger> & /*sk*/, std::string mode = "" )
983 boost::ignore_unused_variable_warning( mode );
984 return new DGtal::DefaultDrawStyle_SignedKhalimskyCell;
986 // SignedKhalimskyCell
988 // SignedKhalimskyPreCell
989 template < DGtal::Dimension dim, typename TInteger >
991 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::SignedKhalimskyPreCell<dim, TInteger> & /*sk*/, std::string mode = "" )
993 boost::ignore_unused_variable_warning( mode );
994 return new DGtal::DefaultDrawStyle_SignedKhalimskyCell;
996 // SignedKhalimskyOreCell
998 // StraightLineFrom2Points
999 template <typename TPoint>
1001 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::StraightLineFrom2Points<TPoint> & /*slf2p*/, std::string mode = "" )
1003 boost::ignore_unused_variable_warning( mode );
1004 return new DGtal::DrawableWithBoard2D;
1006 // StraightLineFrom2Points
1008 // LatticePolytope2D
1009 template < typename TSpace, typename TSequence>
1011 DGtal::DrawableWithBoard2D*
1012 defaultStyle( const DGtal::LatticePolytope2D<TSpace,TSequence> & /*cip*/,
1013 std::string mode = "" )
1015 if ( ( mode == "" ) || ( mode == "Transparent" ) )
1016 return new DGtal::DefaultDrawStyleTransparent_LatticePolytope2D;
1018 return new DGtal::DefaultDrawStyleFilled_LatticePolytope2D;
1020 // LatticePolytope2D
1026 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CustomStyle & /*cs*/, std::string mode = "" )
1028 boost::ignore_unused_variable_warning( mode );
1033 DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::SetMode & /*sm*/, std::string mode = "" )
1035 boost::ignore_unused_variable_warning( mode );
1041 ///////////////////////////////////////////////////////////////////////////////