Package ch.sahits.game.graphic.image

Examples of ch.sahits.game.graphic.image.IOpenPatricianPainter.scaleX()


    // compute the scale in x direction
    platingDestDim =  rect.width-LEFT_PANEL_WIDTH-constantBuffer;
    img = loader.getImage("bottomBorderMiddle");
    platingOrigDim = countComplete*img.getWidth();
    scale = platingDestDim*1.0/platingOrigDim;
    plate = opPainter.scaleX(img, (int)Math.rint(img.getWidth()*scale));
    startX = rect.x+LEFT_PANEL_WIDTH;
    // startY must not be adjusted is correct from above
    // draw top right corner
    img = loader.getImage("leftBottomBorderCorner");
    img = img.getSubimage(img.getWidth()/2, 0, img.getWidth()/2, img.getHeight());
View Full Code Here


        startX += img.getWidth();
      } else {
        // fill all the excessive space
        width = rect.width-cornerDim-startX;
        img = loader.getImage("bottomBorderMiddle"); // overriding since there is no more mortar to be drawn
        plate = opPainter.scaleX(img, width);
        gScr.drawImage(plate, startX, startY, null);
        startX += width;
      }
    }
    // render deco under left side panel
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.