Examples of GetPaperWidth()


Examples of Makelangelo.MachineConfiguration.GetPaperWidth()

    MachineConfiguration mc = MachineConfiguration.getSingleton();
    int w = img.getWidth();
    int h = img.getHeight();
   
    // cap the max_w and max_h so that enormous drawbot images don't break the software.
    double paper_w= mc.GetPaperWidth();
    double paper_h= mc.GetPaperHeight();
    // TODO make this number a variable that can be tweaked
    int max_w=maxWidth;
    int max_h=maxHeight;
    if(paper_w>paper_h) {
View Full Code Here

Examples of Makelangelo.MachineConfiguration.GetPaperWidth()

   * setup transform when there is no image to convert from.  Essentially a 1:1 transform.
   */
  protected void SetupTransform() {
    MachineConfiguration mc = MachineConfiguration.getSingleton();
    // TODO I don't remember why these * 20 are needed here.  Find out and comment the code.
    SetupTransform( (int)mc.GetPaperWidth()*20, (int)mc.GetPaperHeight()*20 );
  }
 
  protected void SetupTransform(int width,int height) {
    image_height = height;
    image_width = width;
View Full Code Here

Examples of Makelangelo.MachineConfiguration.GetPaperWidth()

    scale=10f;

    int new_width = image_width;
    int new_height = image_height;
   
    if(image_width>mc.GetPaperWidth()) {
      float resize = (float)mc.GetPaperWidth()/(float)image_width;
      scale *= resize;
      new_height *= resize;
    }
    if(new_height>mc.GetPaperHeight()) {
View Full Code Here

Examples of Makelangelo.MachineConfiguration.GetPaperWidth()

    int new_width = image_width;
    int new_height = image_height;
   
    if(image_width>mc.GetPaperWidth()) {
      float resize = (float)mc.GetPaperWidth()/(float)image_width;
      scale *= resize;
      new_height *= resize;
    }
    if(new_height>mc.GetPaperHeight()) {
      float resize = (float)mc.GetPaperHeight()/(float)new_height;
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.