/*
the webset of learning G4P
http://www.lagers.org.uk/g4p
the webset of learning MySQL
http://bezier.de/processing/libs/sql/
http://wiki.processing.org/w/How_to_Install_a_Contributed_Library
*/
import g4p_controls.*;
GSlider2D sdrSniper;
PImage imgScene, imgSight;
// Lens properties
int lsize = 40, lsize2 = lsize * lsize;
//mag abd k are used to control the size of enlargement
float mag = 2.0f;
float k = -0.00002;
int sightX, sightY;
int border, borderViaLens;
public void setup() {
size(540, 460);
cursor(CROSS);
imageMode(CENTER);
imgScene = loadImage("backdrop.jpg");
imgSight = loadImage("sight.png");
// border colours
borderViaLens = color(0, 80, 0);
//create a slider in a rect(180,340,180,100);
sdrSniper = new GSlider2D(this,
processing-GUI:G4P library-GSlider2D (滑动器):setLimitsX(),setLimitsY(),getValueXI().getValueYI()
最新推荐文章于 2024-11-08 11:37:30 发布