Re: Design question - Abstract, base, interfaces, ack!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jeff Louie (jeff_louie_at_yahoo.com)
Date: 03/04/05


Date: Thu, 03 Mar 2005 16:32:46 -0800

Rachel... Well you are in luck. I have written 24 chapters on OOP
written using
a IDrawable interface as a sample. There is code listing for a fully
funtional
GDI+ program that draws Circle, Squares and Triangles.

http://www.geocities.com/jeff_louie/OOP/oop19.htm

Here is a chapter that writes the shapes to disk.

http://www.geocities.com/jeff_louie/OOP/oop22.htm

Here is a chapter on dynamic type based class factories

http://www.geocities.com/jeff_louie/OOP/oop18.htm

Regards,
Jeff
This is where I'm stumped. Unless I implement a stub Draw() method in
the
Shape class, the compiler will complain that the Draw method doesn't
exist.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Adding an interface to existing classes
    ... and eventually I want to be able to draw these things on the ... or abstract .draw method and that DrawablePoint, etc, inherit from ... What's this GUI method doing mixed in with my beautiful mathematical ... I would look at various game, graph, geometry, and gui packages handle ...
    (comp.lang.python)
  • Re: oo problem
    ... objects to the draw method of a paper instance. ... actually the paper instance is a subclass of a canvas from an external module. ... I think it's better to clip after all primitives have been added to the paper. ...
    (comp.lang.python)
  • Re: Classes and interfaces
    ... > vector) and also I want it so that the Shape Classes forces the subclasses ... > to implement a Draw() function. ... how do I go about creating the Shape Class to force ...
    (comp.lang.cpp)
  • Re: Capture IWebBrowser image (call IViewObject::Draw from a different thread)
    ... Are you saying it's not possible to use the Draw method in a separate ... get 100ms delay in my render loop, so the fps are limited to 10fps. ... Why not do it the other way round: host each browser in its own worker ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Classwide Parameter?
    ... > rewritten the code to be in one single package now): ... > package Graphics is ... what I want is to have different implementations of the Draw method ... > The Shape's Draw method is always called here but it shouldn't. ...
    (comp.lang.ada)