diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2021-12-25 20:09:20 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2021-12-25 20:09:20 +0000 |
commit | f3b35339610d1ec7c5f8b4cf3bc1a0057400c80f (patch) | |
tree | ae18e6f4cabf4c4785c87f3b0f32eab0cdf3b205 /editor | |
parent | 053fc3f33856d9d5185ee10d25a1643d819abe72 (diff) | |
download | netpbm-mirror-f3b35339610d1ec7c5f8b4cf3bc1a0057400c80f.tar.gz netpbm-mirror-f3b35339610d1ec7c5f8b4cf3bc1a0057400c80f.tar.xz netpbm-mirror-f3b35339610d1ec7c5f8b4cf3bc1a0057400c80f.zip |
Use -halign, -valign with -mwidth, -mheight
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4218 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r-- | editor/pnmpad.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/pnmpad.c b/editor/pnmpad.c index 1e704724..9fa9f9e6 100644 --- a/editor/pnmpad.c +++ b/editor/pnmpad.c @@ -129,16 +129,16 @@ parseCommandLine(int argc, const char ** argv, pm_error("You can specify -height only once"); if (xalignSpec && (cmdlineP->leftSpec || cmdlineP->rightSpec)) - pm_error("You cannot specify both -xalign and -left or -right"); + pm_error("You cannot specify both -halign and -left or -right"); if (yalignSpec && (cmdlineP->topSpec || cmdlineP->bottomSpec)) - pm_error("You cannot specify both -yalign and -top or -bottom"); + pm_error("You cannot specify both -valign and -top or -bottom"); - if (xalignSpec && !cmdlineP->xsizeSpec) - pm_error("-xalign is meaningless without -width"); + if (xalignSpec && (!cmdlineP->xsizeSpec && !mwidthSpec) ) + pm_error("-halign is meaningless without -width or -mwidth"); - if (yalignSpec && !cmdlineP->ysizeSpec) - pm_error("-yalign is meaningless without -height"); + if (yalignSpec && (!cmdlineP->ysizeSpec && !mheightSpec) ) + pm_error("-valign is meaningless without -height or -mheight"); if (xalignSpec) { if (cmdlineP->xalign < 0) @@ -380,7 +380,7 @@ computePadSizesOneDim(unsigned int const unpaddedSize, double const begFrac = totalPadBeforeMult > 0 ? (double)begPadBeforeMult / totalPadBeforeMult : - 0.0; + align; unsigned int const addlMsizeBegPad = ROUNDU(morePadNeeded * begFrac); /* # of pixels we have to add to the beginning to satisfy user's desire for the final size to be a multiple of something |