INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

orcapotrace.h

00001 #ifndef ORCAPOTRACE_POTRACE_H
00002 #define ORCAPOTRACE_POTRACE_H
00003 
00004 #include <hydroogmap/hydroogmap.h>
00005 
00006 // Fwd decls
00007 struct potrace_bitmap_s;
00008 struct potrace_param_s;
00009 struct potrace_state_s;
00010 struct potrace_path_s;
00011 struct potrace_dpoint_s;
00012 
00013 namespace orcapotrace {
00014 
00021 class PotraceBitmap {
00022 public:
00023 
00024     PotraceBitmap( const hydroogmap::OgMap &ogMap );
00025     ~PotraceBitmap();
00026 
00027     void setPixel( int x, int y, bool on );
00028     bool getPixel( int x, int y ) const;
00029 
00030     const potrace_bitmap_s *bitmap() const { return bitmap_; }
00031 
00032 private:
00033     potrace_bitmap_s *bitmap_;
00034     int pixelsPerWord_;
00035 };
00036 
00044 class Potracer {
00045 public:
00046     Potracer();
00047     ~Potracer();
00048 
00049     const potrace_param_s *params() const { return params_; }
00050 
00051     void trace( const potrace_bitmap_s *bitmap );
00052     const potrace_path_s *paths() const;
00053 
00054 private:
00055 
00056     void deleteState();
00057 
00058     potrace_param_s *params_;
00059     potrace_state_s *state_;
00060 };
00061 
00062 std::string toDetailString( const PotraceBitmap &bitmap );
00063 
00064 std::string toString( const potrace_bitmap_s &bitmap );
00065 inline std::ostream &operator<<( std::ostream &s, const potrace_bitmap_s &bitmap )
00066 { return s << toString(bitmap); }
00067 
00068 std::string toString( const potrace_dpoint_s &p );
00069 inline std::ostream &operator<<( std::ostream &s, const potrace_dpoint_s &p )
00070 { return s << toString(p); }
00071 
00072 }
00073 
00074 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5