 |
Author |
Topic: Passing the Graphics Context (Read 1677 times) |
|
liminal
|
Passing the Graphics Context
« on: Feb 13th, 2005, 8:32pm » |
|
Hi, I've started building a small app and have run into a design issue. I'm new to Processing, so I might be going about things the wrong way, but would appreciate some advice. How do I access the graphics context from outside of BApplet (or a subclass)? My code is in another package (BApplet is in the default package), but I can't seem to access the drawing methods in BApplet from anywhere else. I thought I would be able to just pass a reference to the BApplet instance around, but this isn't working (at least in Eclipse). The compiler complains that "The import BApplet cannot be resolved." For example: package a.b.c; import BApplet; public class MyShape { public void draw(BApplet bapplet) { // drawing code goes here... } } Is there a way around this? Is there a reason BApplet is in the default package? Thanks!
|
|
|
|
fry
|
Re: Passing the Graphics Context
« Reply #1 on: Feb 13th, 2005, 10:18pm » |
|
there's a bunch of info elsewhere on the board--just do a search for "BApplet package" and you'll find what you're looking for.
|
|
|
|
|