示例#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();
     }
 }
示例#2
0
 public virtual double calculateWidth(MagickImage image)
 {
     double newWidth = Math.Round(this.getHeight() * image.getWidth() / image.getHeight());
     return Math.Min(newWidth, this.getWidth());
 }
示例#3
0
 public override double calculateWidth(MagickImage image)
 {
     return image.getWidth() * this.getWidth() / 100;
 }
示例#4
0
文件: Gravity.cs 项目: jondot/nmagick
 public override int getX(MagickImage img, int consideredWidth)
 {
     return (int)(img.getWidth() - consideredWidth) / 2;
 }
示例#5
0
文件: Gravity.cs 项目: jondot/nmagick
 public override int getX(MagickImage img)
 {
     return (int)img.getWidth() / 2;
 }
示例#6
0
 public override double calculateWidth(MagickImage image)
 {
     return Math.Round(Math.Sqrt(this.getWidth() * image.getWidth() / image.getHeight()));
 }