JP2004220511A - Method, device and program for editing layout - Google Patents
Method, device and program for editing layout Download PDFInfo
- Publication number
- JP2004220511A JP2004220511A JP2003009964A JP2003009964A JP2004220511A JP 2004220511 A JP2004220511 A JP 2004220511A JP 2003009964 A JP2003009964 A JP 2003009964A JP 2003009964 A JP2003009964 A JP 2003009964A JP 2004220511 A JP2004220511 A JP 2004220511A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- object frame
- drawing area
- layout
- rectangular drawing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Abstract
Description
【0001】
【発明の属する技術分野】
本発明はレイアウト編集方法、レイアウト編集装置及びレイアウト編集プログラムに関する。
【従来の技術】
従来、既存のレイアウト情報をオブジェクトの変更や描画領域の変更に伴って自動編集するレイアウト編集方法が知られている(例えば特許文献1参照)。
【特許文献1】
特開平11−219440号公報
【0002】
【発明が解決しようとする課題】
しかし、特許文献1に記載された方法によると、描画領域の変更に伴って余白の設定が全く異なるものになる結果、描画領域全体のレイアウトがレイアウト編集によりもとのレイアウトと相似でないレイアウトに変換されるという問題がある。具体的には例えば、描画領域いっぱいに写真を余白無しで割り付けたレイアウトは、描画領域のアスペクト比(縦/横)が変更されると、余白を残して描画領域の一部に写真を割り付けるレイアウトに変換される。また例えば、描画領域の周縁に一定幅の余白を残して写真を割り付けたレイアウトは、描画領域のアスペクト比が変更されると、描画領域の周縁に一定でない幅の余白を残して写真を割り付けるレイアウトに変換される。
【0003】
本発明は、この問題を解決するために創作されたものであって、描画領域全体のレイアウトを、描画領域のアスペクト比の異なる相似なレイアウトに変換できるレイアウト編集方法、レイアウト編集装置及びレイアウト編集プログラムを提供することを目的とする。
【0004】
【課題を解決するための手段】
上記目的を達成するため、本発明に係るレイアウト編集装置は、第一のオブジェクトを矩形描画領域に割り付けるための第一オブジェクト枠であって枠の外縁に第一オブジェクトの互いに対向する二辺が重なる第一オブジェクト枠と第二のオブジェクトを矩形描画領域に割り付けるための第二オブジェクト枠とを定義しているレイアウト情報を、もとの矩形描画領域とアスペクト比の異なる新たな矩形描画領域に対するレイアウト情報に変換するレイアウト編集方法であって、コンピュータにより、新たな矩形描画領域に応じて第一オブジェクト枠を変形し、変形後にオブジェクトの外縁と重ならない第一オブジェクト枠の辺の拡大率と等しい拡大率で第二オブジェクト枠を拡大し、第一オブジェクト枠の基準点を始点とし第二オブジェクト枠の基準点を終点とするベクトルが第二オブジェクト枠の拡大率と等しい拡大率で拡大されるように第二オブジェクト枠を平行移動させることを特徴とする。
【0005】
本発明によると、新たな矩形描画領域に応じて第一オブジェクト枠を変形することにより第一オブジェクト枠のアスペクト比が変わると、第一のオブジェクトのアスペクト比と第一オブジェクト枠のアスペクト比が互いに異なるものになる場合がある。具体的には例えば、もとの第一オブジェクト枠の外縁がもとの矩形描画領域の外縁に重なっており、もとの第一オブジェクト枠の外縁と第一のオブジェクトの外縁が重なっている場合において、「余白無し」のレイアウトが維持されるようにもとの矩形描画領域とアスペクト比が異なる新たな矩形描画領域のレイアウトに変換するとき、新たな矩形描画領域の外縁に新たな第一オブジェクトの外縁が重なるように第一オブジェクト枠を変形すると、変形後の第一オブジェクト枠のアスペクト比と第一のオブジェクトのアスペクト比は互いに異なるものになる。このとき、アスペクト比を維持して第一のオブジェクトを拡大又は縮小すると、第一オブジェクト枠の少なくとも一辺はオブジェクトの外縁に重ねることができない。本発明では、このような場合であっても第一オブジェクトと第二オブジェクトの相対的な位置関係及び大小関係が維持されるように、第二オブジェクト枠の拡大及び平行移動を次のように行う。すなわち、変形後にオブジェクトの外縁と重ならない第一オブジェクト枠の辺の拡大率と等しい拡大率で第二オブジェクト枠を拡大し、第一オブジェクト枠の基準点を始点とし第二オブジェクト枠の基準点を終点とするベクトルが第二オブジェクト枠の拡大率と等しい拡大率で拡大されるように第二オブジェクト枠を平行移動させる。したがって、本発明によると、描画領域全体のレイアウトを、描画領域のアスペクト比の異なる相似なレイアウトに変換できる。
【0006】
さらに本発明に係るレイアウト編集装置では、前記第一オブジェクト枠の基準点は前記第一オブジェクト枠の重心であることを特徴とする。第一オブジェクト枠の基準点を重心に設定することにより、第一オブジェクト枠によって第一のオブジェクトの周縁部がクリッピングされる場合とされない場合の両方について、同一の手順により第一オブジェクトと第二オブジェクトの相対的な位置関係を変換前後で維持することができる。
【0007】
本発明に係るレイアウト編集装置は、第一のオブジェクトを矩形描画領域に割り付けるための第一オブジェクト枠であって枠の外縁に第一オブジェクトの互いに対向する二辺が重なる第一オブジェクト枠と第二のオブジェクトを矩形描画領域に割り付けるための第二オブジェクト枠とを定義しているレイアウト情報を、もとの矩形描画領域とアスペクト比の異なる新たな矩形描画領域に対するレイアウト情報に変換するためのレイアウト編集装置であって、新たな矩形描画領域に応じて第一オブジェクト枠を変形する手段と、変形後にオブジェクトの外縁と重ならない第一オブジェクト枠の辺の拡大率と等しい拡大率で第二オブジェクト枠を拡大する手段と、第一オブジェクト枠の基準点を始点とし第二オブジェクト枠の基準点を終点とするベクトルが第二オブジェクト枠の拡大率と等しい拡大率で拡大されるように第二オブジェクト枠を平行移動させる手段と、を備えることを特徴とする。
【0008】
本発明に係るレイアウト編集プログラムは、第一のオブジェクトを矩形描画領域に割り付けるための第一オブジェクト枠であって枠の外縁に第一オブジェクトの互いに対向する二辺が重なる第一オブジェクト枠と第二のオブジェクトを矩形描画領域に割り付けるための第二オブジェクト枠とを定義しているレイアウト情報を、もとの矩形描画領域とアスペクト比の異なる新たな矩形描画領域に対するレイアウト情報に変換するためのレイアウト編集プログラムであって、新たな矩形描画領域に応じて第一オブジェクト枠を変形する手段と、変形後にオブジェクトの外縁と重ならない第一オブジェクト枠の辺の拡大率と等しい拡大率で第二オブジェクト枠を拡大する手段と、第一オブジェクト枠の基準点を始点とし第二オブジェクト枠の基準点を終点とするベクトルが第二オブジェクト枠の拡大率と等しい拡大率で拡大されるように第二オブジェクト枠を平行移動させる手段としてコンピュータを機能させる。
【0009】
尚、本発明に備わる複数の手段の各機能は、構成自体で機能が特定されるハードウェア資源、プログラムにより機能が特定されるハードウェア資源、又はそれらの組み合わせにより実現される。また、これら複数の手段の各機能は、各々が物理的に互いに独立したハードウェア資源で実現されるものに限定されない。
【0010】
【発明の実施の形態】
以下、実施例に基づいて本発明の実施の形態を説明する。
図2は本発明によるレイアウト編集装置10の全体構成を示す図である。レイアウト編集装置10はCPU11、ROM12、RAM13、ディスプレイ14、キーボード15、マウス16、ハードディスク17およびプリンタ18等を備えている。CPU11は、ROM12およびハードディスク17に記憶されているプログラムを実行することにより、レイアウト編集装置10全体を制御する。
このプログラムには、後述するレイアウト編集プログラムも記憶されている。ROM12及びハードディスク17には、この制御プログラムのほかに、画像データ等のオブジェクトやそれらのレイアウト情報が記憶されている。これらのプログラムや各種のデータは、所定のサーバからネットワークを介してダウンロードして入力してもよいし、図示しないリムーバブルメモリ等のコンピュータ読み取り可能な記憶媒体から読み出して入力してもよい。
【0011】
次に、レイアウト定義ファイル20について説明する。図3はレイアウト定義ファイルの内容を示す模式図である。このレイアウト定義ファイル20にはプリンタ18によって解釈されるスクリプトが記述される。プリンタ18はレイアウト定義ファイル20に基づいて画像データ等のオブジェクトを印刷する。レイアウト定義ファイル20には用紙のサイズと印刷対象となるオブジェクトがスクリプトにより定義されている。一枚の用紙にオブジェクトを複数配置する場合には、オブジェクトごとのスクリプトが列記される。
【0012】
次にレイアウト定義ファイル20の中の描画スクリプト21について説明する。描画スクリプト21は、印刷するオブジェクトのファイル名、オブジェクトを印刷用紙に配置するための位置情報、印刷するオブジェクトとオブジェクトを配置する枠(オブジェクト枠)の位置関係をきめる位置関係情報等を、プリンタ等で一義的に解釈可能に定義する。具体的に例えば、印刷するオブジェクトのファイル名(例えば「“fujisan”」)、印刷するオブジェクトを配置するオブジェクト枠を既定する情報(例えば左上座標「(X11,Y11)」と右下座標「(X12,Y12)」)、オブジェクトとオブジェクト枠の位置関係を規定するフィッテング規則(例えば「FitOutside」)およびアライメント規則(例えば「CenterCenter」)等がスクリプトによって定義される。
【0013】
図4(A)は、レイアウト定義ファイル20を用いて印刷される画像を説明するための模式図であり、図4(B)はレイアウト定義ファイル20を用いて印刷した用紙30を示す平面図である。ここで、既定画像と既定画像枠、写真画像と写真画像枠のアスペクト比は必ずしも一致しないため、プリンタ等の印刷装置では、既定画像枠や写真画像枠の位置情報、フィッティング規則、アライメント規則に基づいて、画像を拡大・縮小し、必要に応じて既定画像や写真画像のクリッピングを行って印刷する。
【0014】
ここで、フィッテング規則について説明する。フィッティング規則は、矩形のオブジェクトとそのオブジェクト枠のアスペクト比が異なる場合、オブジェクトのアスペクト比を変えずに、オブジェクトの対向する二組の2辺のうち、少なくとも一組がオブジェクト枠に重なるように、オブジェクトをオブジェクト枠に当てはめる個所を定義するプロパティである。具体的に、オブジェクトをオブジェクト枠に当てはめる場合を図5に基づいて説明する。
【0015】
まず、プロパティ値が“FitOutside”の場合を図5に基づいて説明する。図5はフィッティング規則の“FitOutside”を説明する図である。図5(A)は、オブジェクト枠41のアスペクト比がオブジェクト40のアスペクト比より大きい場合を示す図であり、オブジェクト枠41とオブジェクト40の対向する横方向の二辺が重なるようにオブジェクト40を拡大する。また、図5(B)は、オブジェクト枠43のアスペクト比がオブジェクト40のアスペクト比より小さいか等しい場合を示す図であり、オブジェクト枠43とオブジェクト40の対向する縦方向の二辺が重なるようにオブジェクト40を拡大する。このように、プロパティ値が“FitOutside”の場合、拡大後のオブジェクト42またはオブジェクト44は、上下または左右が切り取られ、オブジェクト枠内に余白がないように枠全体に割り付けられる。
【0016】
次に、プロパティ値が“FitWithin”の場合を図6に基づいて説明する。図6はフィッティング規則の“FitWithin”を説明する図である。図6(A)は、オブジェクト枠45のアスペクト比がオブジェクト40のアスペクト比より大きい場合を示す図であり、オブジェクト枠45とオブジェクト40の対向する縦方向の二辺が重なるようにオブジェクト40を拡大する。また、図6(B)は、オブジェクト枠47のアスペクト比がオブジェクト40のアスペクト比より小さいか等しい場合を示す図であり、オブジェクト枠とオブジェクトの対向する横方向の二辺が重なるようにオブジェクト40を拡大する。プロパティ値が“FitWithin”の場合、拡大後のオブジェクト46またはオブジェクト48は、オブジェクト枠内にオブジェクトの全ての部分が見えるように割り付けられる。なお、図5および図6は、後述するアライメント規則が“CenterCenter”の場合について、フィッティング規則を説明している。
【0017】
次に、アライメント規則について説明する。アライメント規則は、オブジェクトとオブジェクト枠の配置を決めるプロパティで、横方向と縦方向の整列基準を規定するものである。以下、図7に基づいて、具体的にいくつかの例について説明する。図7の(A)は、“LeftTop”を示す図であり、オブジェクト枠51とオブジェクト52の左上点どうしが重なるように配置する、図7(B)は“CenterCenter”を示す図であり、オブジェクト枠53とオブジェクト54の中心点どうしが重なるように配置する。図7(C)は、“RightBottom”を示す図であり、オブジェクト枠55とオブジェクト56の右下点どうしが重なるように配置する。以上のようにアライメント規則では、オブジェクトとオブジェクト枠のどの基準点を合わせるかにより配置を決める。なお、図7は、フィッティング規則“FitOutside”の場合について、アライメント規則のいくつかの例を説明している。
【0018】
次に、本実施例のレイアウト編集プログラムについて説明する。請求項の第一オブジェクトはあらかじめROM12及びハードディスク17に記憶された既定画像とし、第二オブジェクトはプリンタ18に読み込まれている写真画像である。写真画像はレイアウト定義ファイル20の描画スクリプトに写真画像のID番号を書き込むことにより、印刷時に決まる印刷対象の写真画像に対してレイアウトを定義することができる。
【0019】
以下、用紙サイズと既定画像枠が一致する(フチ無し)ように設定されたL版サイズの用紙のレイアウト定義ファイルから、用紙サイズの異なるフチ無しの場合のレイアウト定義ファイルを編集する処理について述べる。本実施例では、余白を含めた用紙全体のレイアウトを相似なレイアウトに変換するため、フチ無しレイアウトをサイズの異なるフチ無しのレイアウトに変換する。なお、フチ無し印刷をするためには、既定画像枠は用紙よりも大きいほうが望ましいが、本実施例では、説明を簡略化するため、既定画像枠と用紙サイズは一致しているものとする。また、このL判のレイアウト定義ファイルでは、既定画像及び写真画像の枠内に余白がなく、画像の中心を枠の中心に配置するため、フィッティング規則をFitOutside”、アライメント規則を“CenterCenter”と設定しているものとする。したがって余白を含めた用紙全体のレイアウトを相似なレイアウトに変換するため、変換後のレイアウト定義ファイルにおいても、既定画像及び写真画像のフィッティング規則、アライメント規則が、“FitOutside”、 “CenterCenter”になるように変換する。
【0020】
図1は本実施例のレイアウト編集プログラムの処理の流れを示すフローチャート図である。
まず、ステップS100では、用紙サイズに応じて、既定画像枠の座標を特定する。フチ無しの場合、既定画像枠の座標は、用紙サイズによって一意に決まる。また、フチがある場合、用紙の端から既定画像枠までの余白は、一定値または用紙の縦横の長さに一定の比率を乗じたものである。
【0021】
ここで、変換前の用紙61の横、縦の長さをl1、l2、変換後の用紙62の横、縦の長さをL1、L2であるとき、既定画像枠の横方向、縦方向の拡大倍率s、tは以下のようになる。
s=L1/l1
t=L2/l2
【0022】
次にステップS110において、変更前の用紙61のアスペクト比I、変更後の用紙62のアスペクト比II、既定画像のアスペクト比IIIを計算する。ここで、写真画像の横、縦の長さをp、qとするとき、
I=l2/l1
II=L2/L1
III=q/p
となる。本実施例では、L版フチ無しのレイアウト定義ファイルを、4x6NP、100x150、ハガキのレイアウト定義ファイルに変換する場合について述べる。この場合、アスペクト比IとIIとの間には、常に
I<II
が成り立つ。そのため、3つのアスペクト比I、II、IIIの関係として次の3つのケースが考えられる。
1)I<II<III または I<II=III
2)I<III<II
3)III<I<II または III=I<II
以下、この3つのケース各々についてレイアウト定義ファイルの写真枠の座標の変換について述べる。
【0023】
まず、ステップS125において、I<II<III または I<II=III の場合について説明する。図8(A)は、I<II<III または I<II=III の場合、変換前の既定画像82、既定画像枠81と既定画像枠の左上座標(a,b)、右下座標(c,d)の位置関係を示す模式図である。図8(B)は、I<II<III または I<II=III の場合、既定画像82を、フィッティング規則“FitOutside”、アライメント規則“CenterCenter”に基づいて拡大、平行移動した既定画像84を、変換後の既定画像枠83に当てはめたときの模式図である。ここで、変換後の既定画像枠84の左上座標を(A,B)、右下座標を(C,D)とする。II<III または II=IIIつまり、既定画像枠のアスペクト比は既定画像のアスペクト比より小さいか等しいので、既定画像は対向する縦方向の2辺が重なるように拡大される。したがって、既定画像は既定画像枠の横方向の拡大倍率sで拡大されればよい。つまり、拡大倍率rはr=L1/l1=s
となる。
【0024】
ここで、一般に図形の拡大・平行移動の変換は(数1)で表される。
【数1】
フィッティング規則がFitOutside、とアライメント規則がCenterCenterであることから、既定画像枠81の中心((a+c)/2,(b+d)/2)は変換後も既定画像枠83の中心((A+C)/2,(B+D)/2)に変換され、それぞれ(数1)に代入すると、次の(数2)が成り立つ。
【数2】
これより、(数2)の(m,n)を求めると、(数3)となる。
【数3】
以上により、既定画像上の各座標(x,y)は、(数4)に示すような(X,Y)に変換される。
【数4】
【0025】
ここで、写真枠の左上及び右下の座標も既定画像上にあり、L判の用紙に配置された既定画像と写真画像が相似なレイアウトに変換されるためには、写真画像枠の座標も既定画像上の各座標と同様に変換されなければならない。したがって、変換前の写真画像枠の座標(x、y)、変換後の写真画像枠の座標(X,Y)とすると、写真枠の座標の変換式も、(数4)のようになる。
【0026】
つぎに、ステップS130において、I<III<II の場合について説明する。図9(A)は、I<III<II の場合、変換前の既定画像82、既定画像枠81と既定画像枠の左上座標(a,b)、右下座標(c,d)の位置関係を示す模式図である。図9(B)は、I<III<II の場合、変換後の既定画像84、既定画像枠83と既定画像枠の左上座標(A,B)、右下座標(C,D)の位置関係を示す模式図である。図9に示すように、変換前はI<IIIであるから縦方向の二辺が重なり、変換後はIII<IIであるから横方向の二辺が重なるように既定画像は拡大される。ここで、変換前の既定画像82を既定画像枠81に対向する二辺が重なるように割り付けたとき既定画像にかける倍率をr1、変換後の既定画像84を既定画像枠83に対向する二辺が重なるように割り付けたとき既定画像にかける倍率をr2とすると、既定画像の縦、横の長さをq、pとすると、(数5)が成り立つ。
【数5】
したがって、拡大倍率rは(数6)のようになる。
【数6】
【0027】
ここで、フィッティング規則がFitOutside、とアライメント規則がCenterCenterであることから、中心座標の変換を考えると、次の(数7)のようになる。
【数7】
これより、(数7)の(m,n)を求めると、(数8)となる。
【数8】
【0028】
以上により、既定画像上の各座標(x,y)は、(数9)に示すような(X,Y)に変換される。
【数9】
【0029】
ここで、写真枠の左上及び右下の座標も既定画像上にあり、L判の用紙に配置された既定画像と写真画像が相似なレイアウトに変換されるためには、写真画像枠の座標も既定画像上の各座標と同様に変換されなければならない。したがって、変換前の写真画像枠の座標(x、y)、変換後の写真画像枠の座標(X,Y)とすると、写真枠の座標の変換式も、(数9)のようになる。
【0030】
次に、ステップS135において、III<I<II または III=I<II の場合について説明する。図10(A)は、III<I<II または III=I<II の場合、変換前の既定画像82、既定画像枠81と既定画像枠の左上座標(a,b)、右下座標(c,d)の位置関係を示す模式図である。図10(B)は、既定画像82を、フィッティング規則“FitOutside”、アライメント規則“CenterCenter”に基づいて拡大、平行移動した既定画像84を、変換後の既定画像枠83に当てはめたときの模式図である。ここで、変換後の既定画像枠84の左上座標を(A,B)、右下座標を(C,D)とする。I>III または III=I つまり、既定画像枠のアスペクト比は既定画像のアスペクト比より大きいか等しいので、既定画像は対向する横方向の2辺が重なるように拡大される。したがって、既定画像は既定画像枠の縦方向の拡大倍率tで拡大されればよい。つまり、拡大倍率rは
r=L2/l2=t
となる。
【0031】
フィッティング規則がFitOutside、とアライメント規則がCenterCenterであることから、既定画像枠81の中心((a+c)/2,(b+d)/2)は変換後も既定画像枠83の中心((A+C)/2,(B+D)/2)に変換され、それぞれ(数1)に代入すると、次の(数10)が成り立つ。
【数10】
これより、(数10)の(m,n)を求めると、(数11)となる。
【数11】
【0032】
以上により、既定画像上の各座標(x,y)は、(数12)に示すような(X,Y)に変換される。
【数12】
【0033】
ここで、写真枠の左上及び右下の座標も既定画像上にあり、L判の用紙に配置された既定画像と写真画像が相似なレイアウトに変換されるためには、写真画像枠の座標も既定画像上の各座標と同様に変換されなければならない。したがって、変換前の写真画像枠の座標(x、y)、変換後の写真画像枠の座標(X,Y)とすると、写真枠の座標の変換式も、(数12)のようになる。
【0034】
ここで、図11に基づいて説明する。図11(A)は、既定画像枠81の中心までのベクトルx1、写真枠91の中心までのベクトルx2、既定画像81の中心を始点として写真枠91の中心を終点とするベクトルuの関係を表した図である。
図11(B)は、変換後の用紙の原点を始点とし既定画像枠83の中心を終点とするベクトルX1、写真枠92の中心までのベクトルX2、既定画像83の中心を始点として写真枠92の中心を終点とするベクトルvとの関係を表した図である。以上の各ベクトルには、(数13)が成り立つ。
【数13】
また、(数4)、(数9)、(数12)は(数14)のように書くことができる。
【数14】
【0035】
したがって、(数13)と(数14)から、(数15)となる。
【数15】
ここで、写真画像も既定画像と等しい倍率で拡大されるから、(数4)、(数9)、(数12)で表される写真枠座標の変換は、既定画像枠の中心を既定画像枠の基準点とし、写真枠の中心を写真枠の基準点とする場合、既定画像枠の基準点を始点とし写真枠の基準点を終点とするベクトルが写真画像の拡大率と等しい拡大率で拡大されている。
【0036】
以上のように、本発明の実施例のレイアウト編集装置によると、用紙全体のレイアウトを、用紙のアスペクト比の異なる場合でも、相似なレイアウトに変更できる。
【図面の簡単な説明】
【図1】本発明に係るレイアウト編集処理を示すフローチャートである。
【図2】本発明に係るレイアウト編集装置を示すブロック図である。
【図3】レイアウト定義ファイルの内容を示す模式図である。
【図4】本発明に係る画像の印刷を説明する模式図及び平面図である。
【図5】フィッティング規則の“FitOutside”を説明する図である。
【図6】フィッティング規則の“FitWhithin”を説明する図である。
【図7】アライメント規則を説明する図である。
【図8】本発明に係る用紙、既定画像の位置関係を示す模式図である。
【図9】本発明に係る用紙、既定画像の位置関係を示す模式図である。
【図10】本発明に係る用紙、既定画像の位置関係を示す模式図である。
【図11】既定画像枠と写真枠の位置関係を表した図である。
【符号の説明】
10 レイアウト編集装置 20 レイアウト定義ファイル 61 変換前の用紙(第一オブジェクトの矩形描画領域) 62 変換後の用紙(第一オブジェクトの矩形描画領域) 81 変換前の既定画像枠(第一オブジェクト枠) 82変換前の既定画像(第一オブジェクト) 83変換後の既定画像枠(第一オブジェクト枠) 82変換後の既定画像(第一オブジェクト) 91 変換前の写真枠(第二オブジェクト枠) 92 変換後の写真枠(第二オブジェクト枠)[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a layout editing method, a layout editing device, and a layout editing program.
[Prior art]
2. Description of the Related Art Conventionally, there has been known a layout editing method for automatically editing existing layout information according to a change in an object or a change in a drawing area (for example, see Patent Document 1).
[Patent Document 1]
JP-A-11-219440
[Problems to be solved by the invention]
However, according to the method described in
[0003]
The present invention has been made to solve this problem, and is a layout editing method, a layout editing apparatus, and a layout editing program capable of converting a layout of an entire drawing area into similar layouts having different aspect ratios of the drawing area. The purpose is to provide.
[0004]
[Means for Solving the Problems]
In order to achieve the above object, a layout editing apparatus according to the present invention is a first object frame for allocating a first object to a rectangular drawing area, and two opposing sides of the first object overlap an outer edge of the frame. The layout information defining the first object frame and the second object frame for allocating the second object to the rectangular drawing area, and the layout information for the new rectangular drawing area having a different aspect ratio from the original rectangular drawing area A layout editing method for transforming a first object frame by a computer in accordance with a new rectangular drawing area, and an enlargement ratio equal to an enlargement ratio of a side of the first object frame which does not overlap with an outer edge of the object after the transformation. To enlarge the second object frame and use the reference point of the first object frame as the starting point And wherein the second object frame is moved parallel to the vector that the reference point to the end point is enlarged by the enlargement factor equal to the magnification of the second object frame.
[0005]
According to the present invention, when the aspect ratio of the first object frame is changed by deforming the first object frame according to the new rectangular drawing area, the aspect ratio of the first object frame and the aspect ratio of the first object frame become mutually different. May be different. Specifically, for example, when the outer edge of the original first object frame overlaps the outer edge of the original rectangular drawing area, and the outer edge of the original first object frame and the outer edge of the first object overlap. In the above, when converting to a layout of a new rectangular drawing area having a different aspect ratio from the original rectangular drawing area so that the layout of “no margin” is maintained, a new first object is added to the outer edge of the new rectangular drawing area. When the first object frame is deformed so that the outer edges thereof overlap, the aspect ratio of the deformed first object frame and the aspect ratio of the first object are different from each other. At this time, if the first object is enlarged or reduced while maintaining the aspect ratio, at least one side of the first object frame cannot be overlapped with the outer edge of the object. In the present invention, even in such a case, the second object frame is enlarged and translated as follows so that the relative positional relationship and the magnitude relationship between the first object and the second object are maintained. . That is, the second object frame is enlarged at an enlargement ratio equal to the enlargement ratio of the side of the first object frame that does not overlap with the outer edge of the object after the deformation, and the reference point of the first object frame is set as the start point and the reference point of the second object frame is set as the reference point. The second object frame is translated so that the vector as the end point is enlarged at an enlargement ratio equal to the enlargement ratio of the second object frame. Therefore, according to the present invention, the layout of the entire drawing area can be converted to a similar layout having a different aspect ratio of the drawing area.
[0006]
Further, in the layout editing apparatus according to the present invention, the reference point of the first object frame is a center of gravity of the first object frame. By setting the reference point of the first object frame to the center of gravity, the first object and the second object are subjected to the same procedure for both the case where the first object frame is clipped and the case where the periphery of the first object is not clipped. Can be maintained before and after the conversion.
[0007]
The layout editing apparatus according to the present invention includes a first object frame for allocating a first object to a rectangular drawing area, wherein the first object frame and the second object frame are arranged such that two opposing sides of the first object overlap an outer edge of the frame. Layout information for converting the layout information defining the second object frame for allocating the object to the rectangular drawing area to the layout information for a new rectangular drawing area having a different aspect ratio from the original rectangular drawing area A device for deforming the first object frame according to the new rectangular drawing area; and forming the second object frame at an enlargement factor equal to an enlargement factor of a side of the first object frame that does not overlap the outer edge of the object after the deformation. Enlarging means, with the reference point of the first object frame as the start point and the reference point of the second object frame as the end point Vector is characterized by comprising, means for translating the second object frame to be enlarged by the enlargement ratio equal to the magnification of the second object frame.
[0008]
A layout editing program according to the present invention includes a first object frame for allocating a first object to a rectangular drawing area, wherein a first object frame and a second object frame are arranged such that two opposing sides of the first object overlap an outer edge of the frame. Layout information for converting the layout information defining the second object frame for allocating the object to the rectangular drawing area to the layout information for a new rectangular drawing area having a different aspect ratio from the original rectangular drawing area Means for deforming the first object frame according to the new rectangular drawing area, and a second object frame having an enlargement ratio equal to the enlargement ratio of the side of the first object frame which does not overlap the outer edge of the object after the deformation. Means for enlarging, the reference point of the first object frame as a starting point, the reference point of the second object frame Vector end point causes the computer to function as means for translating the second object frame to be enlarged by the enlargement ratio equal to the magnification of the second object frame.
[0009]
Each function of the plurality of means provided in the present invention is realized by a hardware resource whose function is specified by the configuration itself, a hardware resource whose function is specified by a program, or a combination thereof. The functions of the plurality of means are not limited to those realized by hardware resources which are physically independent of each other.
[0010]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described based on examples.
FIG. 2 is a diagram showing the overall configuration of the
This program also stores a layout editing program described later. Objects such as image data and their layout information are stored in the
[0011]
Next, the
[0012]
Next, the
[0013]
FIG. 4A is a schematic diagram for explaining an image printed using the
[0014]
Here, the fitting rule will be described. When the aspect ratio of a rectangular object and its object frame is different, the fitting rule is such that at least one of two opposing sides of the object overlaps the object frame without changing the aspect ratio of the object. A property that defines where an object fits into the object frame. Specifically, a case where an object is applied to an object frame will be described with reference to FIG.
[0015]
First, the case where the property value is “FitOutside” will be described with reference to FIG. FIG. 5 is a diagram for explaining the fitting rule “FitOutside”. FIG. 5A is a diagram illustrating a case where the aspect ratio of the
[0016]
Next, a case where the property value is “FitWithin” will be described with reference to FIG. FIG. 6 is a diagram illustrating the fitting rule “FitWithin”. FIG. 6A is a diagram showing a case where the aspect ratio of the
[0017]
Next, the alignment rule will be described. The alignment rule is a property that determines the arrangement of the object and the object frame, and defines the horizontal and vertical alignment criteria. Hereinafter, some examples will be specifically described with reference to FIG. FIG. 7A is a diagram showing “LeftTop”, in which the upper left points of the
[0018]
Next, a layout editing program according to the present embodiment will be described. The first object in the claims is a default image stored in the
[0019]
Hereinafter, a process of editing a layout definition file for a borderless sheet having a different sheet size from a layout definition file for an L-size sheet that is set so that the sheet size matches the default image frame (no border) will be described. In this embodiment, in order to convert the layout of the entire sheet including the margins into a similar layout, the borderless layout is converted to a borderless layout having a different size. In order to perform borderless printing, it is preferable that the default image frame is larger than the paper. However, in the present embodiment, it is assumed that the default image frame and the paper size match for the sake of simplicity. Also, in this L-size layout definition file, the fitting rule is set to "FitOutside" and the alignment rule is set to "CenterCenter" in order to arrange the center of the image at the center of the frame without any margin in the frame of the default image and the photo image. Therefore, in order to convert the layout of the entire sheet including the margins into a similar layout, the fitting rules and alignment rules of the default image and the photographic image are also set to “FitOutside” in the layout definition file after conversion. , "CenterCenter".
[0020]
FIG. 1 is a flowchart illustrating the flow of processing of the layout editing program according to the present embodiment.
First, in step S100, the coordinates of the default image frame are specified according to the paper size. In the case of no border, the coordinates of the default image frame are uniquely determined by the paper size. If there is a border, the margin from the edge of the sheet to the default image frame is a fixed value or a value obtained by multiplying the length and width of the sheet by a certain ratio.
[0021]
Here, when the horizontal and vertical lengths of the paper 61 before conversion are l 1 and l 2 , and the horizontal and vertical lengths of the paper 62 after conversion are L 1 and L 2 , the horizontal direction of the default image frame The vertical magnifications s and t are as follows.
s = L 1 / l 1
t = L 2 / l 2
[0022]
Next, in step S110, the aspect ratio I of the sheet 61 before the change, the aspect ratio II of the sheet 62 after the change, and the aspect ratio III of the default image are calculated. Here, when the horizontal and vertical lengths of the photo image are p and q,
I = l 2 / l 1
III = q / p
It becomes. In the present embodiment, a case will be described in which a layout definition file without borders is converted into a 4 × 6 NP, 100 × 150, postcard layout definition file. In this case, I <II always exists between the aspect ratios I and II.
Holds. Therefore, the following three cases can be considered as the relationship between the three aspect ratios I, II, and III.
1) I <II <III or I <II = III
2) I <III <II
3) III <I <II or III = I <II
Hereinafter, the conversion of the coordinates of the photo frame in the layout definition file will be described for each of these three cases.
[0023]
First, the case where I <II <III or I <II = III in step S125 will be described. FIG. 8A shows the case where I <II <III or I <II = III, the
It becomes.
[0024]
Here, the conversion of the enlargement / translation of the figure is generally represented by (Equation 1).
(Equation 1)
Since the fitting rule is FitOutside and the alignment rule is CenterCenter, the center ((a + c) / 2, (b + d) / 2) of the
(Equation 2)
From this, when (m, n) of (Equation 2) is obtained, it becomes (Equation 3).
[Equation 3]
As described above, each coordinate (x, y) on the default image is converted into (X, Y) as shown in (Equation 4).
(Equation 4)
[0025]
Here, the coordinates of the upper left and lower right corners of the photo frame are also on the default image, and the coordinates of the photo image frame must also be changed so that the default image and the photo image arranged on the L-size paper are converted into a similar layout. Each coordinate on the default image must be transformed as well. Therefore, assuming that the coordinates (x, y) of the photographic image frame before conversion and the coordinates (X, Y) of the photographic image frame after conversion are, the conversion formula of the coordinates of the photographic image frame is also represented by (Equation 4).
[0026]
Next, a case where I <III <II in step S130 will be described. FIG. 9A shows the positional relationship between the
(Equation 5)
Therefore, the magnification r is as shown in (Equation 6).
(Equation 6)
[0027]
Here, since the fitting rule is FitOutside and the alignment rule is CenterCenter, the conversion of the center coordinates is as follows (Equation 7).
(Equation 7)
From this, when (m, n) of (Equation 7) is obtained, (Equation 8) is obtained.
(Equation 8)
[0028]
As described above, each coordinate (x, y) on the default image is converted into (X, Y) as shown in (Equation 9).
(Equation 9)
[0029]
Here, the coordinates of the upper left and lower right corners of the photo frame are also on the default image, and the coordinates of the photo image frame must also be changed so that the default image and the photo image arranged on the L-size paper are converted into a similar layout. Each coordinate on the default image must be transformed as well. Therefore, assuming that the coordinates (x, y) of the photographic image frame before the conversion and the coordinates (X, Y) of the photographic image frame after the conversion, the conversion formula of the coordinates of the photographic image frame is as shown in (Equation 9).
[0030]
Next, the case where III <I <II or III = I <II in step S135 will be described. FIG. 10A shows the case where III <I <II or III = I <II, the
It becomes.
[0031]
Since the fitting rule is FitOutside and the alignment rule is CenterCenter, the center ((a + c) / 2, (b + d) / 2) of the
(Equation 10)
From this, when (m, n) of (Equation 10) is obtained, it becomes (Equation 11).
[Equation 11]
[0032]
As described above, each coordinate (x, y) on the default image is converted into (X, Y) as shown in (Equation 12).
(Equation 12)
[0033]
Here, the coordinates of the upper left and lower right corners of the photo frame are also on the default image, and the coordinates of the photo image frame must also be changed so that the default image and the photo image arranged on the L-size paper are converted into a similar layout. Each coordinate on the default image must be transformed as well. Accordingly, assuming that the coordinates (x, y) of the photographic image frame before conversion and the coordinates (X, Y) of the photographic image frame after conversion are, the conversion formula of the coordinates of the photographic image frame is also represented by (Equation 12).
[0034]
Here, a description will be given based on FIG. FIG. 11A shows the relationship between a vector x1 to the center of the
FIG. 11B shows a vector X1 starting from the origin of the converted sheet and ending at the center of the
(Equation 13)
(Equation 4), (Equation 9), and (Equation 12) can be written as (Equation 14).
[Equation 14]
[0035]
Therefore, (Equation 15) is obtained from (Equation 13) and (Equation 14).
(Equation 15)
Here, since the photo image is also enlarged at the same magnification as the default image, the conversion of the photo frame coordinates represented by (Equation 4), (Equation 9), and (Equation 12) is performed by setting the center of the default image frame to the default image. When the reference point of the frame is used as the reference point of the frame and the center of the photo frame is used as the reference point of the photo frame, a vector having the reference point of the default image frame as the starting point and the reference point of the photo frame as the end point has a magnification equal to the magnification of the photographic image. It has been expanded.
[0036]
As described above, according to the layout editing apparatus of the embodiment of the present invention, the layout of the entire sheet can be changed to a similar layout even when the aspect ratio of the sheet is different.
[Brief description of the drawings]
FIG. 1 is a flowchart showing a layout editing process according to the present invention.
FIG. 2 is a block diagram showing a layout editing device according to the present invention.
FIG. 3 is a schematic diagram showing the contents of a layout definition file.
FIG. 4 is a schematic diagram and a plan view illustrating printing of an image according to the present invention.
FIG. 5 is a diagram illustrating a fitting rule “FitOutside”.
FIG. 6 is a diagram illustrating a fitting rule “Fit Whithin”.
FIG. 7 is a diagram illustrating an alignment rule.
FIG. 8 is a schematic diagram illustrating a positional relationship between a sheet and a default image according to the present invention.
FIG. 9 is a schematic diagram illustrating a positional relationship between a sheet and a default image according to the present invention.
FIG. 10 is a schematic diagram illustrating a positional relationship between a sheet and a default image according to the present invention.
FIG. 11 is a diagram illustrating a positional relationship between a default image frame and a photo frame.
[Explanation of symbols]
Claims (4)
コンピュータにより、新たな矩形描画領域に応じて第一オブジェクト枠を変形し、変形後にオブジェクトの外縁と重ならない第一オブジェクト枠の辺の拡大率と等しい拡大率で第二オブジェクト枠を拡大し、第一オブジェクト枠の基準点を始点とし第二オブジェクト枠の基準点を終点とするベクトルが第二オブジェクト枠の拡大率と等しい拡大率で拡大されるように第二オブジェクト枠を平行移動させることを特徴とするレイアウト編集方法。A first object frame for allocating a first object to a rectangular drawing area, and a first object frame and a second object in which two opposing sides of the first object overlap with the outer edge of the frame to allocate the second object to the rectangular drawing area A layout editing method for converting layout information defining the second object frame into layout information for a new rectangular drawing area having a different aspect ratio from the original rectangular drawing area,
By the computer, the first object frame is deformed according to the new rectangular drawing area, and after the deformation, the second object frame is enlarged at an enlargement ratio equal to the enlargement ratio of the side of the first object frame that does not overlap with the outer edge of the object. The second object frame is translated so that a vector starting from the reference point of one object frame and ending at the reference point of the second object frame is enlarged at an enlargement ratio equal to the enlargement ratio of the second object frame. Layout editing method.
新たな矩形描画領域に応じて第一オブジェクト枠を変形する手段と、
変形後にオブジェクトの外縁と重ならない第一オブジェクト枠の辺の拡大率と等しい拡大率で第二オブジェクト枠を拡大する手段と、
第一オブジェクト枠の基準点を始点とし第二オブジェクト枠の基準点を終点とするベクトルが第二オブジェクト枠の拡大率と等しい拡大率で拡大されるように第二オブジェクト枠を平行移動させる手段と、を備えることを特徴とするレイアウト編集装置。A first object frame for allocating a first object to a rectangular drawing area, and a first object frame and a second object in which two opposing sides of the first object overlap with the outer edge of the frame to allocate the second object to the rectangular drawing area A layout editing apparatus for converting layout information defining the second object frame into layout information for a new rectangular drawing area having a different aspect ratio from the original rectangular drawing area,
Means for deforming the first object frame according to the new rectangular drawing area;
Means for enlarging the second object frame at an enlargement factor equal to the enlargement factor of the side of the first object frame that does not overlap the outer edge of the object after the deformation;
Means for moving the second object frame in parallel so that a vector having the reference point of the first object frame as a start point and the reference point of the second object frame as an end point is enlarged at an enlargement ratio equal to the enlargement ratio of the second object frame; , A layout editing device.
新たな矩形描画領域に応じて第一オブジェクト枠を変形する手段と、
変形後にオブジェクトの外縁と重ならない第一オブジェクト枠の辺の拡大率と等しい拡大率で第二オブジェクト枠を拡大する手段と、
第一オブジェクト枠の基準点を始点とし第二オブジェクト枠の基準点を終点とするベクトルが第二オブジェクト枠の拡大率と等しい拡大率で拡大されるように第二オブジェクト枠を平行移動させる手段としてコンピュータを機能させるためのレイアウト編集プログラム。A first object frame for allocating a first object to a rectangular drawing area, and a first object frame and a second object in which two opposing sides of the first object overlap with the outer edge of the frame to allocate the second object to the rectangular drawing area A layout editing program for converting layout information defining the second object frame into layout information for a new rectangular drawing area having a different aspect ratio from the original rectangular drawing area,
Means for deforming the first object frame according to the new rectangular drawing area;
Means for enlarging the second object frame at an enlargement factor equal to the enlargement factor of the side of the first object frame that does not overlap the outer edge of the object after the deformation;
As means for moving the second object frame in parallel so that a vector starting from the reference point of the first object frame and ending at the reference point of the second object frame is enlarged at an enlargement ratio equal to the enlargement ratio of the second object frame A layout editing program to make a computer function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003009964A JP2004220511A (en) | 2003-01-17 | 2003-01-17 | Method, device and program for editing layout |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003009964A JP2004220511A (en) | 2003-01-17 | 2003-01-17 | Method, device and program for editing layout |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004220511A true JP2004220511A (en) | 2004-08-05 |
Family
ID=32899304
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003009964A Withdrawn JP2004220511A (en) | 2003-01-17 | 2003-01-17 | Method, device and program for editing layout |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004220511A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018055533A (en) * | 2016-09-30 | 2018-04-05 | 富士フイルム株式会社 | Image layout device, image layout method and program therefor |
JP2020087237A (en) * | 2018-11-30 | 2020-06-04 | 株式会社アキュトラス | Cartoon creation assistance system, cartoon creation assistance method and computer program |
-
2003
- 2003-01-17 JP JP2003009964A patent/JP2004220511A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018055533A (en) * | 2016-09-30 | 2018-04-05 | 富士フイルム株式会社 | Image layout device, image layout method and program therefor |
JP2020087237A (en) * | 2018-11-30 | 2020-06-04 | 株式会社アキュトラス | Cartoon creation assistance system, cartoon creation assistance method and computer program |
JP7185908B2 (en) | 2018-11-30 | 2022-12-08 | 株式会社アキュトラス | MANGA CREATION SUPPORT SYSTEM, MANGA CREATION SUPPORT METHOD, AND COMPUTER PROGRAM |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3976363B2 (en) | Automatic graphic pattern placement method and system | |
JP2007013550A (en) | Data processor, data processing method, and computer program | |
US7394563B2 (en) | Image forming apparatus that executes an image trimming process with priority over other commands, method therefor, and storage medium storing a program therefor | |
US20060075362A1 (en) | Image processing apparatus, method, and recording medium on which program is recorded for displaying thumbnail/preview image | |
JP2002165079A (en) | Image processing unit and method | |
US10970017B2 (en) | Control method for controlling an image processing apparatus including printing areas displayed on a display unit and print information facing a predetermined direction | |
JP2008077160A (en) | Image processing device, image processing method, image forming apparatus, computer-executable program, and recording medium storing the program | |
JP2012008884A (en) | Editing device, and layout editing method and program in editing device | |
JP4572830B2 (en) | Printing system and printing method | |
JP2011086050A (en) | Information processing terminal and computer program | |
US9170760B2 (en) | Device, method, and recording medium for outputting image | |
JP6025427B2 (en) | Image processing apparatus, image processing method, and program | |
JP2005018399A (en) | Page processing apparatus and page processing method | |
US6879943B1 (en) | Document processing apparatus and method | |
JP2004220511A (en) | Method, device and program for editing layout | |
JP2008003994A (en) | Printing system | |
JP4306725B2 (en) | Printing support system, printing support program, and printing support method | |
JP2013026865A (en) | Image processing apparatus and image processing method | |
JP2004098650A (en) | Printer | |
JP2004258724A (en) | Document creation support device and method, program and recording medium | |
JP2016200967A (en) | Image processing apparatus, image processing method, and program | |
JP4710508B2 (en) | Image processing program and image processing apparatus | |
JP2000137801A (en) | Method and device for image formation and medium storing image processing control program | |
JP4808128B2 (en) | Image processing system, Web server device, image processing method, and program | |
JP2006197210A (en) | Information processing device, printing system, printing operation assisting method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050420 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20060810 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20061222 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20061226 |
|
RD04 | Notification of resignation of power of attorney |
Effective date: 20070403 Free format text: JAPANESE INTERMEDIATE CODE: A7424 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071211 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071218 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20080213 |