|
Author |
Topic: GUI test case + link + bicubic interpolation (Read 474 times) |
|
madmerv Guest
|
GUI test case + link + bicubic interpolation
« on: Feb 9th, 2004, 3:38pm » |
|
/* * Creates a menu class, where a menu is defined * as a simple list of buttons. */ // constants int DEFAULT = 0; int PRESSED = 1; int HOVER = 2; // To do this properly, a GUI programmer will need to control limits on the screen, // and define them. Here is a limiter, it must be tied into your graphics algorithms // -- there should be some class called screen or display which is the default, // so that apps can still be made without use of a GUI limiter. // // limit(x,y,w,h); // // We'll also need something that can scroll a limit on a page. Meaning, that a // region of the screen defined larger than a limiter can be scrolled. This // would allow for a large pixel area to be defined and manipulated, yet displayed // in a smaller region on the screen, where that limit could be scrolled. // // scrollLimit(x,y); // // Also there would need to be some sort of distinction between image-based // GUI manipulations and generated (using rect() and text()) to create buttons, // perhaps a way to define just the colors and fonts, with auto-sizing based on // a width and a height. // // // There are some other notes regarding mouseDragged and mouseReleased addressed below. // // Some other functions or classes of value: // stretch(image,x,y,w,h); // stretchMode(); where stretchMode() could be NEAREST_NEIGHBOR, BILINEAR and BICUBIC. // (included is a Ken Perlin Bicubic class) // // It would be also nice if you could just point the active region to a pixel[] array // for the purpose of "printing" output to an array of sorts. // Something like: // // active(pixel[],w,h); (this is like "paging") // // Also something for rotation of sprites utilizing BILINEAR or BICUBIC rotation, // such as rotate2d(image,x,y,radians); where a mode would be set with rotateMode(); // // Though you have tint(), I think alpha() would be a nice way of changing the // alpha of the "pen" so that any color drawn after alpha() is called (perhaps // it could be called transparency() or translucent() or translucency() // // Organizing polygons by shape is a step toward models (shapes being actually models), // setting a region variable that could be called would be nice. // // For overloads (or in this case, underloads) it would be nice to grab the current // settings of the renderer by calling, without parameters, the following functions: // // textSize(), textMode(), stroke(), width(), alpha() .. and others // bicubic interpolation by ken perlin // followed by gui test case by madmerv See http://www.madmerv.com/proce55ing/GUI for code+example.
|
|
|
|
|