DrawingArea limit - Motif

This is a discussion on DrawingArea limit - Motif ; Hello all, I have a drawing area to display data like Excel. Sometimes, the number of columns is bigger than 1000 and even more. In this cases, the drawing area is not well painted (get the drawing black, wrong data, ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: DrawingArea limit

  1. DrawingArea limit

    Hello all,

    I have a drawing area to display data like Excel. Sometimes, the number of
    columns is bigger than 1000 and even more. In this cases, the drawing area
    is not well painted (get the drawing black, wrong data, etc..).

    So my question is: is there any width limit for a drawing area?

    Regards,


    Carlos

  2. Re: DrawingArea limit

    Carlos Blanco wrote:

    > I have a drawing area to display data like Excel. Sometimes, the number of
    > columns is bigger than 1000 and even more. In this cases, the drawing area
    > is not well painted (get the drawing black, wrong data, etc..).
    >
    > So my question is: is there any width limit for a drawing area?


    I recall the X coordinate limit is around 65,000 pixels.

    You'll probably need to handle scrolling in the application by just
    redrawing what's visible. Even if X had an infinite coordinate space
    you wouldn't really want to use it otherwise you'd spend all your time
    drawing stuff that can't be seen.

  3. Re: DrawingArea limit


    "Carlos Blanco" wrote in message
    news:Xns9805959CAB7E2carlosblanconimblesi@212.89.0 .29...
    > Hello all,
    >
    > I have a drawing area to display data like Excel. Sometimes, the number of
    > columns is bigger than 1000 and even more. In this cases, the drawing area
    > is not well painted (get the drawing black, wrong data, etc..).
    >
    > So my question is: is there any width limit for a drawing area?
    >
    > Regards,
    >
    >
    > Carlos


    Like any widget, the maximum limit (in pixels) is the largest integer
    that will fit in a variable of type Dimension, defined in X11/Intrinsic.h.
    This is typically an unsigned short int.

    How are you drawing things in the widget? are you setting XmNx for children,
    or drawing lines/.text at specified positions?

    Is your DrawingArea inside a ScrolledWindow?

    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Software Reuse Project



  4. Re: DrawingArea limit

    In article <5xrvg.14832$A8.6383@trnddc02> ST writes:
    >Carlos Blanco wrote:
    >> I have a drawing area to display data like Excel. Sometimes, the number of
    >> columns is bigger than 1000 and even more. In this cases, the drawing area
    >> is not well painted (get the drawing black, wrong data, etc..).
    >>
    >> So my question is: is there any width limit for a drawing area?


    >I recall the X coordinate limit is around 65,000 pixels.


    Actually, I'm pretty sure it's limited to a 16-bit positive integer (32,767)
    in most cases, even though the theoretical limit is 65,535 (16-bit unsigned
    integer). Even if 65,535 is possible, practically it's best to stay in the
    signed range.

    >You'll probably need to handle scrolling in the application by just
    >redrawing what's visible. Even if X had an infinite coordinate space
    >you wouldn't really want to use it otherwise you'd spend all your time
    >drawing stuff that can't be seen.


    That's very good advice.

    -Pete Zakel
    (phz@seeheader.nospam)

    Whenever you start feeling important,
    think about the size hole you leave
    when you get out of the swimming pool.

    - anon.

  5. Re: DrawingArea limit

    "Fred Kleinschmidt" wrote in
    news:J2nnAA.AqE@news.boeing.com:

    >
    > Like any widget, the maximum limit (in pixels) is the largest integer
    > that will fit in a variable of type Dimension, defined in
    > X11/Intrinsic.h. This is typically an unsigned short int.
    >
    > How are you drawing things in the widget? are you setting XmNx for
    > children, or drawing lines/.text at specified positions?
    >
    > Is your DrawingArea inside a ScrolledWindow?
    >


    Just drawing text-lines using positions, no widgets inside the drawingArea.
    And the drawingArea is inside of a ScrolledWindow.

    Tx to all,

    Carlos

+ Reply to Thread