Esempio n. 1
0
 public override double calculateWidth(MagickImage image)
 {
     if (image.getWidth() < this.getWidth() && image.getHeight() < this.getHeight())
     {
         return new Geometry(this.getWidth(),
                             this.getHeight(),
                             this.getX(),
                             this.getY()).calculateWidth(image);
     }
     else
     {
         return image.getWidth();
     }
 }
Esempio n. 2
0
 public virtual double calculateWidth(MagickImage image)
 {
     double newWidth = Math.Round(this.getHeight() * image.getWidth() / image.getHeight());
     return Math.Min(newWidth, this.getWidth());
 }
Esempio n. 3
0
 public override double calculateWidth(MagickImage image)
 {
     return image.getWidth() * this.getWidth() / 100;
 }
Esempio n. 4
0
 public override int getX(MagickImage img, int consideredWidth)
 {
     return (int)(img.getWidth() - consideredWidth) / 2;
 }
Esempio n. 5
0
 public override int getX(MagickImage img)
 {
     return (int)img.getWidth() / 2;
 }
Esempio n. 6
0
 public override double calculateWidth(MagickImage image)
 {
     return Math.Round(Math.Sqrt(this.getWidth() * image.getWidth() / image.getHeight()));
 }