Re: Simplest C++ Line Drawing

From: Dave Farrance (DaveFarrance_at_OMiTTHiSyahooANDTHiS.co.uk)
Date: 04/07/05


Date: Thu, 07 Apr 2005 14:35:31 GMT

Thomas Richter <thor@mersenne.math.tu-berlin.de> wrote:

>Dave Farrance:
>> What's the simplest way to pop open a window and do simple line drawing
>> in C or C++, with a program that can be compiled for Linux (with g++) or
>> for Windows (with mingw) ?
>
>Possibly SDL. http://www.libsdl.org/index.php

Thanks. I had a look through the SDL tutorials, and compiled example 2.8
on this page http://sdldoc.csn.ul.ie/guidevideoopengl.php

When executed, it opened a window that just froze on my Centrino laptop.
I tried the same binary on two other machines, and it worked in both
cases. That's unfortunate because I do most of my work on my laptop.

-- 
Dave Farrance


Relevant Pages

  • Re: UI subsystem interface design
    ... The application constructs its UI by composing the primitive drawing objects and then giving those objects as data to the subsystem, which will be responsible for doing the drawing based upon the data it is given. ... Each window is a rectangle and contains coordinates for its position represented as floating-point numbers between 0 and 1. ... There has to be a mapping of the message data packets in the subsystem interface and you will need some way to ensure that mapping, but I don't see that being dedicated identity objects. ...
    (comp.object)
  • Re: openGL to emulate QuickDraw (i.e. 2D projection)
    ... Dont mind Funghi, he's a bit well, weird. ... 2d drawing; it's quite a bit different than quickdraw ... just to set up a 'working canvas' ... is the actual window you're drawing to, ...
    (comp.graphics.api.opengl)
  • Re: UI subsystem interface design
    ... I will call the user-interface subsystem which I am designing 'the ... UI by composing the primitive drawing objects and then giving those ... The most primitive class of drawing objects is the Window. ... Each window contains a mapping for Colors ...
    (comp.object)
  • Re: PolyLine and autoscrolling canvas
    ... There is something deeply suspicious here about getting a window DC. ... you are drawing the entire window, including borders, captions, etc. ... CRect rect; ... The screen resolution could change at any time, ...
    (microsoft.public.vc.mfc)
  • Re: a new drawing not erase previous drawing?
    ... >in my program a new drawing erases previous drawing. ... And is not erased when the window ... exception, every single pixel, or you will end up with trash on the screen. ... responsibility to see that such pixels are correctly redrawn. ...
    (microsoft.public.vc.mfc)