> Under 32bits OS,
>
> using the same code, but this generateTree, the tree item over
> 65536 overlapped the first one.
> May be an unsigned short is used somewhere instead of the original
> int for computing Y.
>
>
> void generateTree(size_t s, vector<string>& tree) {
>    for ( size_t i = 0;  tree.size() < s; ++i )
>        for ( size_t j = 0; j < s * 5 / 100; ++j ) {
>            ostringstream oss; oss << i << "/"
>                << std::string( i*4, ' ' ) << i * 1000 << " - " << j;
>            tree.push_back( oss.str() );
>        }
> }
>
>

On this issue, is this possible to replicate (somehting like) the clip_to_short 
method used in fl_rect.cxx into fl_font_x.cxx ?
and use it each XUtf8Draw or draw string methods ?

Something like:
namespace {
  const int USHRT_MAX = 65536;

  int clip_to_short(int x, int y) {
    return ( x < 0 || x > USHRT_MAX || y < 0 || y > USHRT_MAX );
  }
}

and in the 2 draw and rtl_draw and a clip check
  if (fl_gc && !clip_to_short(x,y))

(line 335, 341, 350)


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to