Re: Graph Control and vertical text

new topic     » goto parent     » topic index » view thread      » older message » newer message

Greg Haberek wrote:
> 
> I just submitted my new Graph control to The Archive. It uses
> Win32Lib's custom control interface. I believe it's the first of its
> kind, aside from GroupAdv. Also the first graphing control for
> Euphoria period.
> 
> It currently only supports vertical graphs, since I've come across a
> bit of a problem. How does one draw text vertically? I haven't found a
> flag for drawText() that I can use or any other routine for drawing
> text vertically. I was thinking I could draw it to a Pixmap, rotate
> the Pixmap and draw that to the screen, but I'd like to do it in one
> call, and avoid using the Pixmap buffer. If no such routine/flag
> exists, the I'll go my Pixmap/rotate route.
> 
> ~Greg
> 
> 

Greg:

    You use GDI's MoveToEx() to move to a point.
    then use LineTo() to draw vertically up to that point.

BOOL MoveToEx(
  HDC hdc,          // handle to device context
  int X,            // x-coordinate of new current position
  int Y,            // y-coordinate of new current position
  LPPOINT lpPoint   // pointer to old current position
);

BOOL LineTo(
  HDC hdc,    // device context handle
  int nXEnd,  // x-coordinate of line's ending point
  int nYEnd   // y-coordinate of line's ending point
); 
   

Bernie

My files in archive:
w32engin.ew mixedlib.e eu_engin.e win32eru.exw

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu