Exemplo n.º 1
0
 public override double calculateHeight(MagickImage image)
 {
     if (image.getWidth() < this.getWidth() && image.getHeight() < this.getHeight())
     {
         return new Geometry(this.getWidth(),
                             this.getHeight(),
                             this.getX(),
                             this.getY()).calculateHeight(image);
     }
     else
     {
         return image.getHeight();
     }
 }
Exemplo 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());
 }
Exemplo n.º 3
0
 public override double calculateHeight(MagickImage image)
 {
     return image.getHeight() * this.getHeight() / 100;
 }
Exemplo n.º 4
0
 public override int getY(MagickImage img, int consideredHeight)
 {
     return (int)(img.getHeight() - consideredHeight) / 2;
 }
Exemplo n.º 5
0
 public override int getY(MagickImage img)
 {
     return (int)img.getHeight() / 2;
 }
Exemplo n.º 6
0
 public override double calculateWidth(MagickImage image)
 {
     return Math.Round(Math.Sqrt(this.getWidth() * image.getWidth() / image.getHeight()));
 }