JP4458640B2 - Drawing instruction apparatus, drawing instruction method thereof, and computer-readable storage medium - Google Patents

Drawing instruction apparatus, drawing instruction method thereof, and computer-readable storage medium Download PDF

Info

Publication number
JP4458640B2
JP4458640B2 JP2000243323A JP2000243323A JP4458640B2 JP 4458640 B2 JP4458640 B2 JP 4458640B2 JP 2000243323 A JP2000243323 A JP 2000243323A JP 2000243323 A JP2000243323 A JP 2000243323A JP 4458640 B2 JP4458640 B2 JP 4458640B2
Authority
JP
Japan
Prior art keywords
data
hit
pick window
drawing instruction
attribute
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.)
Expired - Fee Related
Application number
JP2000243323A
Other languages
Japanese (ja)
Other versions
JP2002056403A (en
JP2002056403A5 (en
Inventor
勝 影浦
玲子 堀川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2000243323A priority Critical patent/JP4458640B2/en
Publication of JP2002056403A publication Critical patent/JP2002056403A/en
Publication of JP2002056403A5 publication Critical patent/JP2002056403A5/ja
Application granted granted Critical
Publication of JP4458640B2 publication Critical patent/JP4458640B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、描画指示装置及び描画指示方法に関し、例えばCAD(Computer Aide Design)やDTP(Desk Top Publishing)等のアプリケーションにおいて対話形式の処理によって図形・文字列データの作成・印刷等を行う描画指示装置及び描画指示方法に関する。
【0002】
【従来の技術】
従来より利用されているCADやDTP等のアプリケーションと、高精度な印刷装置とを使用した版下作成のような作業においては、オペレータが所望する最終的な印刷イメージを保ちながら、表示装置に表示される画面を見ながらの編集作業、所謂WYSIWYG(What You See is What You Get)の環境において、印刷イメージを基にした高精度なピック(ピッキング)処理が行えることが必要である。ここで、ピック処理とは、マウス等のポインティング装置を用いてオペレータが指定した表示装置上の任意位置に従って、その表示装置に表示されている描画要素やパターンを選択する処理である。
【0003】
【発明が解決しようとする課題】
しかしながら、従来のCADやDTP等のアプリケーションにおいて行われるピック処理においては、線幅やテキスト等の印刷属性を考慮せずに、表示器に各種パターンを描画するための簡易的な幾何情報等が用いられる場合がある。この場合、図10に例示する如く大きな線幅の線分が表示されている状態において、線幅方向の端部をピックしても、その線分を正しくピッキングできなかったり、或いは、図11に例示するような一点鎖線を対象としているときには、線の無い部分をピックしても、その一点鎖線の描画要素が選択されてしまったり、更には、図12に例示するように、文字列の文字以外の部分を選択しても、その選択部分がフォントボックスという文字を囲む外接矩形の範囲内であれば、そのフォントボックスが選択されてしまう。
【0004】
また、選択しようとする描画要素が、図13に例示するように重なっている場合には、隠れている要素を選択するのが困難であるというような問題もある。
【0005】
そこで本発明は、操作性に優れ、印刷属性を考慮したピック処理を行う描画指示装置及び描画指示方法及びコンピュータ読み取り可能な記憶媒体の提供を目的とする。
【0006】
【課題を解決するための手段】
上記の目的を達成するため、本発明に係る描画指示装置は、以下の構成を特徴とする。
【0007】
即ち、描画中の描画要素の中から、選択された可能性のある描画要素を、指示部により指示された入力座標に基づいて取り出す要素取得手段と、各描画要素の表示イメージにおける輪郭図形を取り出す輪郭図形取得手段と、前記入力座標と前記輪郭図形取得手段によって取得した輪郭図形とに基づいて、ヒットしている描画要素を判定するヒット判定手段と、前記ヒット判定手段によってヒットしていると判定された描画要素を、選択された描画要素の候補として抽出すると共に、抽出された候補の中から何れかの描画要素を、該選択された描画要素として決定する選択手段とを備え、前記ヒット判定手段は、前記入力座標に基づいて、所定の面積を有するピックウインドウを作成するピックウインドウ作成手段と、前記ピックウインドウ作成手段によって作成されたピックウインドウと、前記輪郭図形取得手段によって取得した輪郭図形とが干渉しているかを判定する干渉判定手段と、を含み、前記ピックウインドウ作成手段は、予め登録された前記ピックウインドウのサイズLを、使用している表示装置の座標系に対応するサイズL’に変換するサイズ補正手段を含むことを特徴とする。
【0011】
上記の目的を達成するため、本発明に係る描画指示方法は、以下の構成を特徴とする。
【0015】
【発明の実施の形態】
以下、本発明に係る描画指示装置及び描画指示方法の実施形態を、図面を参照して詳細に説明する。
【0016】
[第1の実施形態]
[ハードウエア構成の説明]
図2は、本発明の第1の実施形態に係る描画指示装置のハードウエア構成を示すブロック図である。
【0017】
図2において、21は、中央処理装置(CPU)であり、本装置の全体の制御や演算処理を行なう。11は、オペレータが文字や数値を入力可能なキーボードであり、12は、座標や図形を指示するため補助入力装置としてのマウスである。41はCRT等の表示装置であり、CPU21が実行するソフトウエアプログラムに従って、図形データおよび文字データ、各種操作パネルやボタンを表示する。即ち、キーボード11、マウス12、並びに表示装置41は、本実施形態においてマンマシンインタフェースとして機能する。
【0018】
22はシステムバスであり、本装置を構成するハードウエアの各要素は、全てこのシステムバス22を介してプログラムおよびデータの受け渡しを行なっている。
【0019】
また、31は、読出専用記憶装置(ROM)であり、本実施形態に係るプログラムは、このROM31に予め格納されており、CPU21は、ROM31から読み出したプログラムを実行する。32は、読出書込記憶装置(RAM)であり、本実施形態に係るプログラムの実行中に、CPU21は、必要に応じて、RAM32にデータを読み書きしながら処理を行なう。33は、フロッピーディスク装置(FD)やハードディスク装置(HD)等の外部記憶装置であり、文字の書体情報やコード情報等のデータが格納されている。
【0020】
尚、本実施形態に係るプログラムを、外部記憶装置33に格納させておき、RAM32に読み込んでから、CPU21によって実行するようにしてもよいし、また、文字の書体情報やコード情報等のデータをROM31に格納させておき、CPU21が必要に応じて、それらのデータを読み出して使用するようにしてもよい。
【0021】
51は、印刷装置の一例としてのレーザプリンタであり、本装置によって作成された印刷データを、校正刷り(印刷データの確認のための出力)し、また印刷ログファイルの内容を出力する。52は、イメージセッターであり、本装置によって作成された印刷データを、清刷り(正式な版下となる高精度な出力)する。53は、レーザマーカーであり、本装置によって作成された印刷データを、レーザで直接、製品に焼き付ける。
【0022】
ここで、レーザプリンタ51と、イメージセッター52と、レーザマーカー53の違いについて説明する。
【0023】
レーザプリンタ51は、照射されたレーザ光によって感光ドラム上に形成された静電潜像にトナーを吸着させ、そのトナー像を記録紙に転写・定着するプリンタであり、解像度は1500DPI(ドット/インチ)程度まで可能である。また、イメージセッター52は、レーザ光を直接、感光紙に照射するプリンタであり、解像度は、400DPI程度まで可能である。イメージセッター52に使用する用紙サイズは、A1程度まで可能である。そして、レーザマーカー53は、レーザ光を直接、成形品に照射し、樹脂材料を溶融して黒化させるか、充填材を配合した特殊材料を使用して発色させる印刷装置である。
【0024】
次に、本実施形態に係る表示機能について説明する。本実施形態に係る描画指示装置は、図形データおよび文字データを、印刷時の出力形態と同じ表示形態のイメージで、表示装置41に表示する制御を行なう、所謂WYSIWYGの機能を有しており、これを説明する図が図3である。
【0025】
図3(a)は、表示装置41に表示されるWYSIWYGの表示例であり、図3(a)の表示形態は、印刷時の出力結果の例である図3(c)の出力形態と略同じになっている。
【0026】
一方、図3(b)は、WYSIWYGではない表示例を示しており、この図3(b)の表示形態は、印刷時の出力結果の例である。この図3(b)の表示形態は、印刷時の出力結果の例である図3(c)の出力形態とは異なっている。
【0027】
次に、本実施形態に係る表示装置41上の操作画面について説明する。
【0028】
図4は、本実施形態に係るピック処理プログラムの実行時に、表示装置41に表示されるメインパネル61を例示する図である。
【0029】
図4において、61はメインパネル、62は作画エリア、63はマウスポインタ、64は文字入力エリア、65はボタン群、66は汎用ボタン、67はコマンドメニュー、68はガイダンスエリア、71はメインパネル以外のパネル、72はパネル71上のボタンである。また、これら図4上のボタンは、全てソフトキーである。
【0030】
このメインパネル61上で、キーボード11や、マウス12等の入力装置をオペレータが操作するのに応じて、本実施形態に係る描画指示装置は、対話的に、印刷データの作成および編集作業を行なう。作成された印刷データは、作画エリア62に表示される。
【0031】
また、必要に応じて、メインパネル61以外に、各種のパネル71が表示され、パネル71上で操作を行なうこともある。
【0032】
以下、表示装置41に表示されるソフトウエアパネルを介して、本実施形態においてオペレータが入力可能な方法について、図4を参照して説明する。
【0033】
キーボード11から入力を行なう場合、オペレータは、文字入力エリア64を、マウス12またはキーボード11で指示してから、文字または数値を入力する。また、マウス12によって入力を行なう場合には、以下の方法を用いる。
【0034】
まず、特定の要素やボタンを選択する方法としては、次の(1)と(2)の2つの方法がある。
【0035】
(1)要素選択:作画エリア62に表示されている描画パターン(印刷データに基づいてCPU21が表示しているパターン)の所望の位置に、オペレータがマウスポインタ63を移動させて、その位置において、例えばマウス左ボタンを押下することによって、操作の対象とする要素を選択する。
【0036】
(2)ボタン選択:メインパネル61に表示されている、各種のボタン65、汎用ボタン66、必要に応じて表示されるパネル71内に表示される各種のボタン72の所定位置に、オペレータがマウスポインタ63を移動させて、その位置で、例えばマウス左ボタンを押下することによって、操作の対象とするボタンを選択する。
【0037】
また、作画エリア62上の特定の位置を指定する方法として、次の(3)から(7)までの、5つの方法がある。
【0038】
(3)任意指定:作画エリア62上の、任意の位置に、マウスポインタ63を移動させて、その位置で、例えばマウス右ボタンを押し下げることによって、位置を指定する。
【0039】
(4)点指定:作画エリア62に表示されている、点を要素選択することによって、位置を指定する。
【0040】
(5)特徴点指定:作画エリア62に表示されている、点以外の要素を要素選択することによって、その要素の特徴となる点をCPU21が抽出し、位置を指定する。
【0041】
ここで、特徴点が複数存在する場合に、1点を特定する方法には、要素選択した際のマウスポインタ63の位置に最も近い特徴点をCPU21が自動的に抽出する方法、複数存在する特徴点の中からさらに1点を点指定する方法等がある。
【0042】
図5に、図形データの各要素の特徴点の例を示す。同図において、*印で示した点は、各種の図形の形状を特徴付ける特徴点である。即ち、図5において、各種の図形データを特徴付けする特徴点の具体的な位置は、以下に示す通りである。
・線分:両端点、中点、
・円:中心点、円の中心からXおよびY軸方向に引いた直線と円との交点(4点)、
・円弧:中心点、両端点、中点(円弧の距離を二分する円弧上の点)、
・楕円:中心点、楕円の短軸および長軸と楕円との交点(4点)、
・楕円弧:中心点、両端点、楕円弧の短軸および長軸と楕円弧を含む楕円との交点(4点)、中点(楕円弧の距離を二分する楕円弧上の点)、
・線分列:線分列を構成する各線分の両端点、中点、
・自由曲線:両端点、曲線の制御点、中点(自由曲線の距離を二分する点)。
【0043】
(6)交点指定:作画エリア62に表示されているところの、線分や円等の線要素を、1個または2個、要素選択することによって、それらの要素の交点をCPU21が算出し、位置を指定する。
【0044】
ここで、単一の線要素が、それ自体で交点を持つ場合、すなわち、自己交差している場合は、線要素を1個、要素選択するだけでよい。その他の場合は、2個の線要素を指定する(図6参照)。
【0045】
交点が複数存在する場合に、1点を特定する方法には、先または後に要素選択した際のマウスポインタ63の位置に最も近い交点をCPU21が自動的に抽出する方法、複数存在する交点の中からさらに1点を点指定する方法等がある。
【0046】
(7)線上点指定:作画エリア62に表示されている、線分、円等の線要素を1個要素選択することによって、そのときのマウスポインタ63の位置に最も近い線要素上の点をCPU21が算出し、位置を指定する。
【0047】
図7に、円弧を要素選択して、線上指定によって位置を指定した例を示す。図7においては、レ印で示した位置において、線分、円弧の順で要素選択を行ない、*印の位置が交点指定によって指定されたことを示している。レ印の点は、円弧近傍の点、*印の点は、円弧上の点である。
【0048】
次に、本実施形態で扱う「コマンド」について説明する。本実施形態では、印刷データの作成および編集作業の各単位を「コマンド」と称する。
【0049】
本実施形態で扱うコマンドには、点、直線、円、曲線等、各要素を作成するコマンド(作図コマンド)や、移動、複写、削除、属性等、各要素の形状や属性等を修正するコマンド(修正コマンド)や、その他、ファイル、プリント、トンボ、バーコード、等に冠するコマンド等がある。
【0050】
本実施形態に係る描画指示装置を利用して、オペレータが印刷データの作成や編集を行なうには、まず、作業単位に合わせた任意のコマンドを1つ選択する。
【0051】
コマンドの選択には、図4に示す文字入力エリア64で、コマンドの名称をキーボード11から入力する方法や、コマンドの名称があらかじめ設定されているメインパネル61上のボタン65を、ボタン選択する方法等がある。
【0052】
オペレータによるコマンドの選択が行われると、それまですでに選択されているコマンドがあった場合には、そのコマンドの終了処理が行われている。続いて、新たに選択されたコマンドの初期処理が行なわれ、コマンド内の処理に入る。
【0053】
コマンドが選択されると、表示装置41上に選択されたコマンド内でのさらに細かい作業単位を選択するための、コマンドメニュー67が表示される。ユーザーは、コマンド目に67の任意のメニュー項目のボタンをボタン選択することによって、各種の編集作業を行なうことができる。ユーザーがどのような操作を行なえばよいかといった指示は、作業の状況に応じて、その都度、ガイダンスエリア68に表示されるので、ユーザーは、この指示に従って、操作を行なえばよい。
【0054】
[データ構造]
<印刷データの要素>
次に、本実施形態に係る描画指示装置で作成可能な印刷データを構成するところの、図形データおよび文字データの要素に、どのような種類が存在するのかについて具体的に説明する。
【0055】
本実施形態に係る描画指示装置で作成可能な図形データおよび文字データの要素には、大きく分けて、以下の(A)〜(E)の5つの種類がある。
【0056】
(A)基本図形:点、線分、線分列(開/閉)、円、円弧、楕円、楕円弧、自由曲線(開/閉)、
(B)塗り潰し図形、
(C)その他の図形:トンボ、バーコード、
(D)テキスト、
(E)グループ図形:シンボル、イラスト。
【0057】
ここでいう要素とは、図形データまたは文字データに、印刷データとして必要な属性(印刷属性と呼ぶ)を付加して、実際に印刷データとしてレイアウトされるデータの単位を意味している。また、印刷データとしてレイアウトされた複数の要素をまとめてグループ化すれば、それを1つの要素として扱うこともできる。要素のグループ化の方法については後述する。
【0058】
次に、上記の(A)〜(E)の5つの要素について詳細に説明する。
【0059】
まず、(A)の基本図形は、最も基本となる図形データの要素である。この他、線分列によって構成される矩形(各辺がXおよびY軸に平行である長方形)、正多角形等を、基本図形の要素として扱うこともできる。また、自由曲線としては、ベジェ、有利ベジェ、Bスプライン、エルミート、NURBS等の表現形式を扱うことができる。
【0060】
また、(B)の塗り潰し図形は、(A)の要素(点を除く)を単独で、または、複数を連結させることで、閉領域を形成し、その内部を塗り潰した図形データの要素である。塗り潰しの方法には、次の4種類がある。
【0061】
(1)フィルエリア:内部を均一に塗り潰す。
【0062】
(2)ハッチング:一定の傾きと間隔を持った複数の線分で塗り潰す。塗り潰し図形内の特定の点を、ハッチングの基準点として指定することもできる。
【0063】
(3)メッシュ:円、矩形、正多角形等、一定の形状の図形の繰り返しで塗り潰す。塗り潰し図形内の特定の点を、メッシュの基準点として指定することもできる。
【0064】
(4)パターン:あらかじめ作成されたビットパターンの繰り返しで塗り潰す。
【0065】
また、(C)のその他の図形には、トンボ、バーコード等がある。これらの要素は、図形データと、文字データの両方を含んでいる。トンボ、バーコードの各要素の作成方法については、後述する。
【0066】
また、(D)のテキストは、文字データの要素である。図形データの要素と同様に、印刷データとしてレイアウトすることができるが、印刷属性の種類や、レイアウトの方法は図形データの要素とは異なる。
【0067】
最後に(E)のグループ図形は、(A)の基本図形、(B)の塗り潰し図形、(C)のその他の図形、(D)のテキストの各要素を、1つ以上任意の数だけ選択して、まとめて1つの要素として扱うためのもので、シンボルとイラストがある。
【0068】
<印刷データの印刷属性>
次に、本実施形態に係る描画指示装置で作成可能な印刷データである図形データおよび文字データの印刷属性に、どのような種類が存在するのかを、具体的に説明することにする。
【0069】
作成可能な図形データおよび文字データの印刷属性には、大きく分けて、以下の(a)〜(g)の7つの種類がある。
【0070】
まず、図形データおよび文字データに共通の印刷属性には、次に示す(a)〜(c)の3つの種類がある。
【0071】
(a)表示属性:要素を表示するか否か、また、表示する場合に、どのような上下関係で表示するか(表示プライオリティと呼ぶ)を指定する。
【0072】
(b)選択属性:要素選択が可能であるか否かを指定する。要素選択を不可すると、その要素に対しての操作は行なえなくなる。
【0073】
(c)色属性:RGBあるいはHLS等のカラーモデルの種別、および、カラーコードの値を与えることによって、要素の色を表現する。白と黒義Iの色が表現できないモノクロームの、表示装置41またはレーザプリンタ51等の印刷装置を使用している場合、色属性に応じて、白または黒のどちらかの色に変換されて出力される。
【0074】
次に、図形データ固有の印刷属性には、次に示す(d)〜(f)の3つの種類がある。
【0075】
(d)点属性:点要素の場合、点のある位置に記号を表示したり、文字列を表示したりすることができる。
【0076】
(e)線属性:点以外の基本図形の要素(線要素)の場合、次に示すさまざまな線の属性を表現することができる。
【0077】
・線種:線要素の形状を示し、実線、破線、一点鎖線、二点鎖線、等がある。
【0078】
・線幅:線要素の法線方向の大きさを示す。あらかじめ定められた、細線、中線、太線、等の種別を指定したり、実寸で指定したりすることができる。
【0079】
・線幅方向:線幅を考慮しない場合から、法線方向のどちらに線幅分だけオフセットさせるかを示す。
【0080】
・終端形状:線分や円弧等の開図形の終端の形状で、ラウンド、フラット、スクエア、等がある。
【0081】
・接続形状:線分列や矩形等の図形の角の形状で、マイター、ラウンド、ベベル、等がある。
【0082】
・線ピッチ:線種が実線以外の場合、線が存在する部分と、存在しない部分の長さをそれぞれ実寸、またはパラメータで与えることができる。
【0083】
(f)塗り潰し属性:塗り潰し図形要素(描画要素)の場合、フィルエリア、ハッチング、メッシュ、パターン、等の内部の塗り潰し方法の種類や、ハッチングやメッシュの場合の必要な詳細データ、パターンの場合の、パターン番号を与える。
【0084】
最後に、文字データ固有の印刷属性には、次に示す(g)の1種類のみがある。
【0085】
(g)文字列属性:テキスト要素の場合、次に示すさまざまな文字の属性、および文字列全体の属性を表現することができる。
・書体:一組の文字のデザインを表し、クーリエ、ヘルベチカ、ゴシック、等がある。
・文字サイズ:文字の大きさを表し、一般には1つの文字が専有する矩形領域はボディの行送り方向の高さと等しい。
・平体率:文字を、文字の行送り方向にどれだけ縮めるかを比率で表す。
・長体率:文字を、文字の字送り方向にどれだけ縮めるかを比率で表す。
・ベース角:文字の字送り方向がX軸となす角度を表す。
・斜体角:文字の字送り方向に対する、文字の傾斜角度を表す。
・字間:同一行の隣接する2文字のボディの間隔を表す。
・行間:隣接する2行にある文字のボディの間隔を表す。
・文字列反転:文字列を反転(鏡像)して表示する。
【0086】
<印刷データのデータ構造>
次に、本実施形態における印刷データのデータ構造について説明する。
【0087】
本実施形態における印刷データは、上述した複数の要素データ、複数の印刷属性データから構成されている。
【0088】
ここで、各要素データは、基本的に、データ種別コード、データ番号、各要素ごとの必要データ、各要素ごとの必要印刷属性データのデータ番号からなる。
【0089】
そして、印刷データ内でユニークに付けられたデータ種別コードによって、印刷データ内の各要素データの種別を特定することができる。
【0090】
また、印刷データ内でユニークに付けられたデータ番号によって、印刷データ内の各要素データを特定することができる。各要素ごとに、必要データ、必要印刷属性の種類は異なるが、データ種別コードによってCPU21はこれらを識別することが可能である。
【0091】
また、各印刷属性については、各要素データごとに保持するのではなく、各要素データでは、必要な印刷属性データのデータ番号のみを保持するようにしている。これによって、印刷属性データの重複を避け、印刷データの容量を縮小することや、複数の要素データの印刷属性を一度の操作で変更すること等が可能になっている。
【0092】
まず、図形データおよび文字データの各要素のデータ構造を、以下に具体的に示す。
【0093】
(A)基本図形:
(1)点
・データ種別コード、
・データ番号、
・点座標:c[2]、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・点属性のデータ番号、
(2)線分
・データ種別コード、
・データ番号、
・始点座標:s[2]、
・終点座標:e[2]、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・線属性のデータ番号、
(3)線分
・データ種別コード、
・データ番号、
・通過点数:np、
・各通過点座標:pp[2](np個)、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・線属性のデータ番号、
(4)円
・データ種別コード、
・データ番号、
・中心座標:c[2]、
・半径:r、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・線属性のデータ番号、
(5)円弧
・データ種別コード、
・データ番号、
・始点座標:s[2]、
・終点座標:e[2]、
・中心座標:c[2]、
・回り方向フラグ(時計回り/反時計回り)、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・線属性のデータ番号、
(6)楕円
・データ種別コード、
・データ番号、
・中心座標:c[2]、
・長軸ベクトル:a[2]、
・短軸ベクトル:b[2]、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・線属性のデータ番号、
(7)楕円弧
・データ種別コード、
・データ番号、
・始点座標:s[2]、
・終点座標:e[2]、
・中心座標:c[2]、
・長軸ベクトル:a[2]、
・短軸ベクトル:b[2]、
・回り方向フラグ(時計回り/反時計回り)、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・線属性のデータ番号、
(8)自由曲線(ベジェ曲線の場合)
・データ種別コード、
・データ番号、
・曲線数:nv、
・各曲線の制御点データ(nv個)、
制御点数:nc、
各制御点座標:pc[2](nc個)、
重み係数:w、
・通過点数:np、
・各通過点座標:pp[2](np個)、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・線属性のデータ番号、
(B)塗り潰し図形:
・データ種別コード、
・データ番号、
・レイアウト基準矩形左下点座標:p1[2]、
・レイアウト基準矩形右下点座標:p2[2]、
・ループ数:nl、
・各ループの構成要素データ(nl個):
構成要素数:nd、
構成要素データ:点を除く基本図形要素データ(nd個)、
・通過基準点座標:pp[2]、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・塗り潰し属性のデータ番号、
・枠の表示属性のデータ番号、
・枠の色属性のデータ番号、
・枠の線属性のデータ番号。
【0094】
ここで、塗り潰し図形では、印刷属性として、塗り潰し図形の内部の印刷属性の他に、塗り潰し図形の枠の印刷属性を別に持っている。例えば、内部の色属性と、枠の色属性を変えて表示すること等が可能である。
【0095】
(C)その他の図形:
(1)トンボ、
・データ種別コード、
・データ番号、
・トンボ種別フラグ(トンボ/スケールトンボ)、
・トンボ形状フラグ(トンボの場合は11種類/スケールトンボの場合は3種類)、
・トンボオフセットフラグ(オフセットあり/なし)、
・印刷データ名称(スケールトンボの場合)、
・トンボ長さ(スケールトンボの場合)、
・レイアウト基準点座標:pb[2]、
・出力倍率:sc、
・レイアウト基準矩形左下点座標:p1[2]、
・レイアウト基準矩形右下点座標:p2[2]、
・構成要素数:nd、
・構成要素データ:トンボの場合は線分、スケールトンボのバーは線分、円、テキストのいずれかの要素データ(nd個)、
(2)バーコード、
・データ種別コード、
・データ番号、
・バーコード種別フラグ(4種類)、
・コードデータ、
・コード表示フラグ(コード表示あり/なし)、
・レイアウト基準位置フラグ(左下/中央/右上等9種類)、
・レイアウト基準点座標:pb[2]、
・レイアウト角度:ang、
・レイアウトスケール:sc、
・レイアウト基準矩形左下点座標:p1[2]、
・レイアウト基準矩形右上点座標:p2[2]、
・構成要素数:nd、
・構成要素データ:線分、テキストのいずれかの要素データ(nd個)、
(D)テキスト:
(1)基本文字列(テキストを構成する要素)、
・データ種別コード、
・データ番号、
・文字列開始点座標:pt[2]、
・文字列バイト数:nch、
・文字列データ:str(nchバイト)、
・レイアウト角度:ang、
・レイアウトスケール:sc、
・表示属性のデータ番号、
・選択属性のデータ番号、
・色属性のデータ番号、
・文字列属性のデータ番号、
(2)テキスト
・データ種別コード、
・データ番号、
・レイアウト基準位置フラグ(左下/中央/右上等9種類)、
・レイアウト基準点座標:pb[2]、
・レイアウト基準矩形左下座標:p1[2]、
・レイアウト基準矩形右上座標:p2[2]、
・構成要素数:nd、
・構成要素データ:基本文字列の要素データ(nd個)。
【0096】
ここで、テキスト要素は、複数の基本文字列要素を組み合わせて構成される。これによって、ひとつのテキスト要素の中で、複数の文字列属性を持った文字列を扱うことが可能となる。例えば、ひとつのテキストの途中で文字の書体を変更したり、文字の高さや幅を変更する制御が可能である。
【0097】
(E)グループ図形:
(1)シンボル
・データ種別コード、
・データ番号、
・フォルダー名称、
・ファイル名称、
・レイアウト基準位置フラグ(左下/中央/右上等9種類)、
・レイアウト基準点座標:pb[2]、
・レイアウト角度:ang、
・レイアウトスケール:sc、
・レイアウト基準矩形左下点座標:p1[2]、
・レイアウト基準矩形右上点座標:p2[2]、
・反転フラグ(反転あり/なし)、
・線幅スケールフラグ(線幅スケールあり/なし)、
・線幅スケール値、
(2)イラスト
・データ種別コード、
・データ番号、
・フォルダー名称、
・ファイル名称、
・レイアウト基準位置フラグ(左下/中央/右上等9種類)、
・レイアウト基準点座標:pb[2]、
・レイアウト角度:ang、
・レイアウトスケール:sc、
・レイアウト基準矩形左下点座標:p1[2]、
・レイアウト基準矩形右上点座標:p2[2]、
・反転フラグ(反転あり/なし)、
・構成要素数:nd、
・構成要素データ:任意の要素データ(nd個)。
【0098】
尚、シンボルおよびイラストのデータ構造の特徴、およびシンボルデータファイルおよびイラストデータファイルのファイル構造については後述する。
【0099】
次に、上述したようなデータ構造を有する要素データに対応する印刷属性データのデータ構造について説明する。
【0100】
ここで、各印刷属性データは、基本的に、データ種別コード、データ番号、属性設定フラグ、各印刷属性毎の必要データという構成を有する。印刷データ内の各印刷属性データの種別は、印刷データ内でユニークに付けられたデータ種別コードによって特定することができる。
【0101】
また、印刷データ内でユニークに付けられたデータ番号によって、印刷データ内の各印刷属性データを特定することができる。各印刷属性ごとに必要データは異なるが、データ種別コードによって、CPU21は、これらを識別することが可能である。
【0102】
また、属性設定フラグとは、その印刷属性データが有効であるか否かを指定するフラグである。属性設定フラグが有効である印刷属性データを指示している要素データでは、該当する印刷属性データに従って要素が表示されている。
【0103】
一方、属性設定フラグが無効である印刷属性データを指示している要素データでは、該当する印刷属性は設定されていない状態であると見なし、予めROM31や外部記憶装置33に記憶されているデフォルトの印刷属性に従って、要素が表示される。
【0104】
また、各要素データに階層関係を持たせることが可能なデータ構造とした場合には、上位の(または下位の)要素の印刷属性に従って表示を行なう制御も可能である。
【0105】
次に、各印刷属性データのデータ構造を具体的に示す。
【0106】
(a)表示属性
・データ種別コード、
・データ番号、
・属性設定フラグ(有効/無効)、
・表示フラグ(表示/非表示)、
・表示プライオリティ、
(b)選択属性
・データ種別コード、
・データ番号、
・属性設定フラグ(有効/無効)、
・要素選択フラグ(可/不可)、
(c)色属性
・データ種別コード、
・データ番号、
・属性設定フラグ(有効/無効)、
・カラーコード識別フラグ(RGB/HLS)、
・カラーコード1、2、3、
(d)点属性
・データ種別コード、
・データ番号、
・属性設定フラグ(有効/無効)、
・マーカー文字列、
(e)線属性
・データ種別コード、
・データ番号、
・属性設定フラグ(有効/無効)、
・線種フラグ(実線/破線/一点鎖線/二点鎖線/任意破線/任意一点鎖線/任意二点鎖線)、
・線幅フラグ(細線/中線/太線/極太線/任意線幅)、
・線方向フラグ(中央/内側/外側)、
・終端形状フラグ(ラウンド/フラット/スクエア)、
・接続形状フラグ(マイター/ラウンド/ベベル)、
・線種データ1、2、3、4(線種=任意のとき)、
・線幅データ(線幅=任意のとき)、
(f)塗り潰し属性
・データ種別コード、
・データ番号、
・属性設定フラグ(有効/無効)、
・塗り潰し種別フラグ(塗り潰しあり/塗り潰しなし/ハッチング/メッシュ番号/パターン番号等)、
・データグループ数:nd、
・塗り潰しデータ1、2、3(nd個)、
(g)文字列属性
・データ種別コード、
・データ番号、
・属性設定フラグ(有効/無効)、
・書体、
・文字サイズ、
・平体率、
・長体率、
・ベース角、
・斜体角、
・字間、
・行間、
・文字列反転フラグ(あり/なし)。
【0107】
上述した印刷データのデータ構造に基づいて、本実施形態に係る描画指示装置で作成された印刷データファイルの一例を、図8に示す。
【0108】
この図8に示された印刷データは、図9に示すような形状の図形を印刷するための印刷データであり、図9に示す印刷データにより表現される図形は、複数種類の基本図形の要素から成り、1個の線分列と2個の円と、これら3要素の外接矩形の左下点および右上点の2点(この2点は非表示で選択不可)から構成される。また、これら1個の線部列と2個の円が、それぞれ同じ表示属性(表示)、選択属性(選択可)、線属性(実線、線幅20mm)を持ち、互いに異なる色属性を持っているものとする。
【0109】
<グループ図形のデータ構造>
次に、上述した印刷データのデータ構造のうち、特にグループ図形であるシンボルとイラストのデータ構造について詳述する。
【0110】
まず、シンボルのデータ構造について説明する。
【0111】
本実施形態において、シンボルとは、規格で定められた記号や、ロゴマークのように、繰り返し使用される図形で、図形データの要素(線分や円等)や、文字データの要素(テキスト)を組み合わせて、作成される要素である。
【0112】
規格が変更される等により、シンボルデータのファイルの内容が更新された場合、本実施形態では、既に印刷データの一部としてレイアウト済みである該当するシンボルを全て更新して、データの同期を維持することができる。即ち、本実施形態に係る描画指示装置では、シンボルのデータを次に示すようなデータ構造で保持している。
【0113】
印刷データ内には、シンボルデータファイルの存在場所を特定するための、フォルダー名称およびファイル名称、そして、シンボルをレイアウトするために必要な情報のみを保持する。
【0114】
また、印刷データをファイルに保存した印刷データファイルとは別個に、シンボルデータファイルを作成する。シンボルデータファイルは、次に示すようなファイル構造となっている。
・レイアウト基準矩形左下点座標:p1[2]、
・レイアウト基準矩形右上点座標:p2[2]、
・構成要素データ:任意の要素データ(複数)、
・印刷属性データ:必要な印刷属性データ(複数)。
【0115】
レイアウト基準矩形については後述するが、レイアウト基準矩形を定めておけば、シンボルを印刷データとしてレイアウトする際に必要な位置と大きさの情報を特定することが可能である。例えば、レイアウト基準矩形としては、シンボルの可視部分を囲む最小の矩形(外接矩形と呼ぶ)を指定しておくこと等が可能である。
【0116】
シンボルデータファイルを作成する際に該当するシンボルの外接矩形のデータをレイアウト基準矩形として登録しておけば、シンボルデータファイルを再度読み込んだ際等に、シンボルの外接矩形を再計算する必要がなくなる。
【0117】
シンボルの各構成要素データは、レイアウト基準矩形左下点を基準とする相対座標値で表現されている。
【0118】
また、各印刷属性データについては、印刷データの場合と同様に、各構成要素データを表示する際に必要な印刷属性データを、要素データとは別に保持している。
【0119】
このように、本実施形態では、変更のあったシンボルを含む印刷データファイルの更新を敢えて行なわなくても、該当する印刷データファイルを外部記憶装置33からRAM32に再度読み込むだけで、印刷データ内のシンボルデータは、最新のシンボルデータファイルの内容に自動的に更新され、データを自動的に同期させることができる。
【0120】
次に、もう一つのグループ図形であるイラストのデータ構造について説明する。
【0121】
本実施形態において、イラストとは、テンプレート図形のように繰り返し使用される図形で、これもまたシンボルと同様に図形データの要素(線分や円等)や、文字データの要素(テキスト)を組み合わせて作成される要素である。
【0122】
イラストは、上述したシンボルの場合とは異なり、一旦印刷データの一部としてレイアウトされた後は、元のイラストデータファイルの内容とは同期を取らずに自由に変更を加えたい場合に使用される。
【0123】
従って、イラストデータの場合には、上述したシンボルデータの自動更新とは異なり、イラストデータファイルの内容が更新された場合でも、既に印刷データの一部としてレイアウト済みである該当するイラストを更新して同期を維持することはない。
【0124】
そこで、本実施形態に係る描画指示装置では、イラストのデータを、次に示すようなデータ構造で保持している。
【0125】
すなわち、印刷データ内には、イラストデータファイルの存在場所を特定するためのフォルダ名称およびファイル名称、そしてイラストをレイアウトするために必要な情報の他に、イラストデータファイルから読み込んだイラストを実際に構成する各要素データを保持している。
【0126】
また、印刷データファイルとは別個にイラストデータファイルを作成する。イラストデータファイルは、次に示すようなファイル構造となっている。
・レイアウト基準矩形左下点座標:p1[2]、
・レイアウト基準矩形右上点座標:p2[2]、
・構成要素データ:任意の要素データ(複数)、
・印刷属性データ:必要な印刷属性データ(複数)。
【0127】
この構造は、シンボルデータファイルのファイル構造と同様である。これを印刷データに読み込む際には、指定したレイアウト基準点座標を原点とし、指定したレイアウト角度、レイアウトスケールに従ってイラストデータファイル内の各構成要素データを展開して(座標変換して)、印刷データのイラスト要素データとして、全て保持する点がシンボルとは異なっている。
【0128】
[ピック処理]
次に、上述した描画制御を実現すべく図2に示す描画指示装置にて実行されれるピック処理について説明する。
【0129】
図1は、第1の実施形態におけるピック処理の手順を示すフローチャートであり、CPU21が実行する。
【0130】
同図において、ステップS1:WYSIWIGの環境下において、オペレータが表示装置41を見ながらマウス12等を用いて指示した入力座標を取り出し(図14参照)、その座標値を、読出書込記憶装置32もしくは外部記憶装置33(以下、総称して記憶装置)に保存する。
【0131】
ステップS2:ステップS1で保存した座標値と、表示装置41に表示されている要素図形の表示位置データとに基づいて、オペレータが選択した可能性のある要素図形を判定し、選択した可能性のある要素図形を示す識別番号等を、選択可能性要素リストとして記憶装置に保存しておき、順番に取り出していく(図14参照)。
【0132】
ステップS3:ステップS2で順番に取り出した図形要素の識別番号等に従って、予め記憶されている各図形要素の幾何および属性データを基に、輪郭図形を算出して記憶装置に保存する(図15参照)。
【0133】
ステップS4:ステップS1で保存した入力座標と、ステップS3で保存した輪郭図形情報とに基づいて、ヒットしているかどうかを判定する。
【0134】
ここで、ステップS4の処理の詳細について、図19を参照して説明する。
【0135】
図19において、ステップS4−1:入力座標に基づいて、ピックウインドウ(所定の面積を持つ領域)を作成(図16参照)する。ピックウインドウの作成手順については、図20に示すフローチャートに従って行えば良い。
【0136】
図20において、ステップS4−1−1:記憶装置またはオペレータによって入力された辺長を、ピックウインドウの辺長Lとして取得する。
【0137】
ステップS4−1−2:表示装置41において所定長さになるように。辺長LをL’に変換する。具体的には、表示座標系が拡大されて表示装置41に表示されていたときには、そのスケール値で辺長Lを割るなどの処理により、表示装置上において辺長Lを反映した所定長さL’になるように変換する。
【0138】
ステップS4−1−3:入力座標を中心として、ステップS4−1−2で算出した一辺の長さL’の正方形をピックウインドウとする。
【0139】
次に、図19の説明に戻って、ステップS4−2:上記の如く求めたピックウインドウと、ステップS3で求めた輪郭図形とが干渉しているかを判定する(図17参照)。
【0140】
ステップS4−3〜ステップS4−5:ステップS4−2の判断において、干渉していたらヒットしていると判定し、干渉していなかったからヒットしていないと判定する。
【0141】
ステップS4−2における具体的な手順は、図21に示すフローチャートに従って行えば良い。
【0142】
図21において、ステップSS4−2−1:各要素の属性等も考慮した表示イメージの輪郭図形の外接矩形を取り出す。
【0143】
ステップS4−2−2:ピックウインドウと、上記の如く求めた輪郭図形の外接矩形とが干渉するかどうかを調べる。本ステップでは、少ない計算量でラフに干渉しているかを調べるのが目的なので、印刷属性を考慮して幾何的に求めれば良い。
【0144】
ステップS4−2−3〜ステップS4−2−6:干渉する可能性がないと判定されたらステップS4−2−6においてヒットしていないと判定し、干渉する可能性があると判定したらステップS4−2−4において輪郭図形のデータを利用してピックウインドウと輪郭図形の外接矩形とが実際に干渉しているかを調べ、ステップS4−2−5において、その結果に従ってヒットしているものを特定する。ここで、より具体的な手順について、図22を参照して後述する。
【0145】
図22において、ステップS4−2−3−1:輪郭図形を表示装置41に表示したときの表示イメージのビットマップイメージを算出する。
【0146】
ステップS4−2−3−2:ピックウインドウを表示装置41に表示したときの表示イメージのビットマップイメージを算出する。
【0147】
ステップS4−2−3−3:上記の如く求めた輪郭図形及びピックウインドウの各ビットマップイメージにおいて、各画素ごとに干渉しているかを調べる。これは各画素ごとの論理積を取れば良い。
【0148】
ステップS4−2−3−4〜ステップS4−2−3−6:一画素でも干渉していればヒットしていると判定し、一画素も干渉していなければヒットしていないと判定する。
【0149】
ここで、図1の説明に戻る。ステップS5〜ステップS6:上述したステップS4においてヒットしていると判定された要素を、選択要素候補として、記憶装置に保存する。
【0150】
ステップS7:登録されている選択要素がまだあるかどうか判定し、まだある場合は、ステップS3に戻って残りの選択された可能性のある要素に関して、上述したステップS3からステップS6の処理を行う。
【0151】
ステップS8〜ステップS10:選択要素候補があるかを判断し(ステップS8)、ある場合は、ヒットされた要素の中からある基準により選択要素を決定し(ステップS9)、なければ選択要素なしとする(ステップS10)。
【0152】
ここで、ステップS9の処理の詳細について、図23を参照して説明する。
【0153】
図23において、ステップS9−1:ヒットしている要素のうち一番高い優先順位を持つものを探索する。尚、各要素には予め優先順位が設定されているものとする。
【0154】
探索した結果、最も優先順位を持つ要素が複数ある場合は、下記の(S8−2)以下の処理を行う。
【0155】
ステップS9−2,ステップS9−6:探索した結果、最も高い優先順位を持つ要素が複数あるかを判断し(ステップS9−2)、一つしかない場合は、ステップS9−6においてその要素を選択要素とする。
【0156】
ステップS9−3:ステップS9−2の判断の結果、最も高い優先順位を持つ要素が複数あるので、上記の如く求めた最も高い優先順位を持つ複数の要素を、要素種別ごとに分類し、要素種別ごとに設定した優先順位により最も高い優先順位を持つものを探索する。
【0157】
尚、要素種別毎の優先順位として、点が一番高い優先順位、塗り潰し図形が一番低い優先順位、それ以外がその間の優先順位とする。こうした理由は一般に点は、他の要素の影に隠れて、選択しにくいため、塗り潰し図形は他の要素を隠してしまって、選択されやすいため、その効果を打ち消すために例えば上記の優先順位にすれば、いろいろな種別の要素を等しく選択しやすくなるからである。(図13参照)
ステップS9−3のより具体的な手順は、例えば図24のフローチャートの如く行えば良い。
【0158】
図24において、ステップS9−3−1〜ステップS9−3−2:要素種別が点のものを探索し、点がある場合はそれを取り出す。点がない場合は、ステップS9−3−4以下の処理に移る。
【0159】
ステップS9−3−4〜ステップS9−3−7:要素種別に塗り潰し図形でないものを探索し、塗り潰し図形でないものがある場合は、ステップS9−3−3にてその図形を取り出す。一方、塗り潰し図形でないものがない場合は、ステップS9−3−7にて塗り潰し図形を取り出す。
【0160】
ステップS9−4:上記のステップS9−3において探索した結果、要素が複数あるかを判断し、複数有る場合はステップS9−5に進み、要素が一つしかない場合は、ステップS9−6においてその要素を選択要素とする。
【0161】
ステップS9−5:描画リストの順位に従って選択図形を決定する。ここで、各要素の描画の優先順位は、リストによって管理されているものとする。このリストは、例えば最初にあるものほど先に描画し、後ろにあるものほど後に書くものとする。結果として、リストの後ろにあるものほど表示装置41のオペレータにとって手前側に表示されているように表示される。このとき、上記の複数の選択された候補要素がある場合、描画リストの一番後ろのものを選べば、一番手前側の要素が選択されることになる。
【0162】
このような第1の実施形態によれば、操作性に優れ、印刷属性を考慮したピック処理が実現する。
【0163】
[第2の実施形態]
次に、上述した第1の実施形態に係る描画指示装置を基本とする第2の実施形態を説明する。以下の説明においては、第1の実施形態と同様な構成については重複する説明を省略し、本実施形態における特徴的な部分を中心に説明する。
【0164】
本実施形態に係る描画指示装置は、ステップS4−2−3における処理が図25に示すフローチャートの手順に従って行われる点が、図22に示すフローチャートに従って行われる第1の実施形態と異なる。
【0165】
図25において、ステップS4−2−3−1A〜ステップS4−2−3−4A:要素データとピックウインドウが幾何的に干渉するかどうか調べ、要素データとピックウインドウが幾何的に干渉しているかを計算して求める(ステップS4−2−3−1A)。その結果、干渉していると判定されたらヒットしているとし(ステップS4−2−3−3A)、干渉していないと判定されたらヒットしていないと判定する(ステップS4−2−3−4A)。
【0166】
このような本実施形態によっても、第1の実施形態と略同様な効果が享受できる。
【0167】
[第3の実施形態]
次に、上述した第1の実施形態に係る描画指示装置を基本とする第3の実施形態を説明する。以下の説明においては、第1の実施形態と同様な構成については重複する説明を省略し、本実施形態における特徴的な部分を中心に説明する。
【0168】
本実施形態に係る描画指示装置は、ステップS4−2−3における処理が図26に示すフローチャートの手順に従って行われる点が、図22に示すフローチャートに従って行われる第1の実施形態と異なる。
【0169】
図26において、ステップS4−2−3−1B:文字列を構成する各文字のフォントボックスの矩形の和を、フォントボックスとして算出する。
【0170】
ステップS4−2−3−2B:ピックウインドウと、ステップS4−2−3−1Bで求めた矩形とが幾何的に干渉するかどうかを調べ(ステップS4−2−3−3B)、干渉していると判定されたらヒットしていると判定し(ステップS4−2−3−4B)、干渉していないと判定されたらヒットしていないと判定する(ステップS4−2−3−5B)。
【0171】
このような本実施形態によっても、第1の実施形態と略同様な効果が享受できる。
【0172】
[第4の実施形態]
次に、上述した第1及び第2の実施形態に係る描画指示装置を基本とする第4の実施形態を説明する。以下の説明においては、第1の実施形態と同様な構成については重複する説明を省略し、本実施形態における特徴的な部分を中心に説明する。
【0173】
本実施形態に係る描画指示装置は、ステップS4−2−3における処理が図27に示すフローチャートの手順に従って行われる点が、図22に示すフローチャートに従って行われる第1の実施形態と異なる。
【0174】
図27において、ステップS4−2−3−1C:要素を表示したときのイメージの輪郭図形のデータ量を推定する。このとき、あまりデータ量が多いとイメージのビットマップによる干渉判定は多くの資源を使い、計算コストも高いので、まず元の要素データからデータ量を推定する。
【0175】
ステップS4−2−3−2C〜ステップS4−2−3−4C:ステップS4−2−3−1Cにて推定したデータ量と所定量とを比較し(ステップS4−2−3−2C)、その結果、当該データ量が所定量より少ないときには、上述した第1の実施形態におけるステップS4−2−3−2(図22)と同様に、輪郭図形及びピックウインドウの各ビットマップイメージの各画素ごとの干渉判定を行うことによってヒット処理を行う(ステップS4−2−3−3C)。一方、推定したデータ量が所定量以下のときには、上述した第2の実施形態における図25のフローチャートと同様な手順で幾何的に干渉判定を行う(ステップS4−2−3−4C)。
【0176】
ビットマップを使った干渉判定は、資源・計算コストを使うものの印刷属性等を考慮した精密な干渉判定が行える。一方、幾何的な干渉判定は、若干精密さを損なうものの、少ない資源・低い計算コストで行うことができる。本実施形態によれば、最初の要素の表示イメージの輪郭図形のデータ量を推定することにより適応的に上記の2処理を切り替えるようにしたものである。
【0177】
このような本実施形態によっても、第1の実施形態と略同様な効果が享受できる。
【0178】
[第5の実施形態]
次に、上述した第1の実施形態に係る描画指示装置を基本とする第5の実施形態を説明する。以下の説明においては、第1の実施形態と同様な構成については重複する説明を省略し、本実施形態における特徴的な部分を中心に説明する。
【0179】
本実施形態に係る描画指示装置は、ステップS9における処理が図28に示すフローチャートの手順に従って行われる点が、図23及び図24に示すフローチャートに従って行われる第1の実施形態と異なる。
【0180】
図28において、ステップS9−1A:選択要素候補が重なっていて、オペレータが選択に難い場合があるので、一時的に重ならないように、選択要素候補を一時的に位置をずらして表示する(図18参照)。より具体的な手順は、例えば、図29に示すフローチャートに従って行えば良い。
【0181】
図29において、ステップS9−1A−1,ステップS9−1A−2:重なっている各要素の外接矩形を算出し、重なっている図形をずらして表示するときの各要素間の距離を示す適当なマージン値を設定する。
【0182】
ステップS9−1A−3:入力座標を中心に各要素の外接矩形が、ステップS9−1A−2で設定したマージン値の分だけ他の要素の外接矩形と縦・横方向に配置できるように、各図形の移動量を算出する。
【0183】
ステップS9−1A−4,ステップS9−1A−5:選択要素候補となっている図形要素が画面内に全て納まるかを判断し、その判断の結果、図形要素が全て納まるときにはステップS9−1A−6に進み、納まらないときには、ステップS9−1A−5において、マイナスの値になるのも許して、マージン値を減らして画面内におさまるように各図形の移動量を再算出する。または、画面の表示スケールを縮小して、選択要素候補となっている要素がすべて画面内におさまるようにする。
【0184】
ステップS9−1A−6:求めた移動量により各図形を一時的に再配置する。
【0185】
次に、図28の説明に戻り。ステップS9−2A:上記如く一時的に表示位置をずらした各図形要素をオペレータが判り易いように、高輝度表示、特殊な色による表示、点滅などの特殊な表示状態に一時的にする。
【0186】
ステップS9−3A:オペレータに上記の如く表示した選択要素候補の中から所望の図形要素を選ばせるために、マウス12等のポインティングデバイスにより座標を入力させる。
【0187】
ステップS9−4A〜ステップS9−7A:本実施形態では、第1の実施形態で説明したような選択要素が複数あるという前提をおかないピック処理を行う。即ち、ピック処理の結果、選択された図形がある場合は、それを選択図形とする(ステップS9−6A)。一方、選択された図形がない場合は、エラーとして、もう一度ユーザに入力させ直すなどのエラー処理を行う(ステップS9−7A)。
【0188】
ステップS9−8A:ステップS9−2Aの処理で一時的にずらして特殊な表示状態になっている要素を元の状態に戻す。
【0189】
このような本実施形態によっても、第1の実施形態と略同様な効果が享受できる。
【0190】
[第6の実施形態]
次に、上述した第1の実施形態に係る描画指示装置を基本とする第6の実施形態を説明する。以下の説明においては、第1の実施形態と同様な構成については重複する説明を省略し、本実施形態における特徴的な部分を中心に説明する。
【0191】
図30は、第6の実施形態におけるピック処理の手順を示すフローチャートであり、ステップS1乃至ステップS6は、第1の実施形態における図1のステップS1乃至ステップS6と同様の処理を行う。即ち、ステップS6において1つでもヒットしている図形要素があればその図形要素を、選択要素とする。これによりすばやい選択処理が可能になる。
【0192】
ステップS11,ステップS12:ステップS5の判断でヒットしていないときには、ステップS11において図1のステップS7と同様に、まだ選択された可能性のある図形要素が有るかを判断する。この判断の結果、まだ選択された可能性のある図形要素が有るときにはステップS2に戻り、無いときには、ステップS12において選択要素無しとする。
【0193】
このような本実施形態によっても、第1の実施形態と略同様な効果が享受できる。
【0194】
以上説明した各実施形態によれば、操作性に優れ、印刷属性を考慮したピック処理が実現する。また、描画指示装置の計算資源量に応じて、通常は、精密な印刷属性を含む表示データを基にピック処理を行うものの、資源量が足りない場合は、簡易的な処理でピック処理を行うため、状況に応じた適切な処理が行える。
【0195】
【他の実施形態】
なお、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成される。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。
【0196】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。
【0197】
【発明の効果】
以上説明したように、本発明によれば、操作性に優れ、印刷属性を考慮したピック処理を行う描画指示装置及び描画指示方法及びコンピュータ読み取り可能な記憶媒体の提供が実現する。
【図面の簡単な説明】
【図1】ピック処理の手順を説明するフローチャートである。
【図2】本発明の第1の実施形態の描画指示装置のハードウエア構成を示すブロック図である。
【図3】WYSIWYGの機能を説明する図である。
【図4】第1の実施形態に係るピック処理プログラムの実行時に、表示装置41に表示されるメインパネル61を例示する図である。
【図5】各要素の特徴点を示す図である。
【図6】交点指定による位置の指定の例を示す図である。
【図7】線上点指定による位置の指定の例を示す図である。
【図8】印刷データファイルの例を示す図である。
【図9】シンボルの例を示す図である。
【図10】線幅・端点属性の印刷属性を考慮しないピック処理の例を示す図である。
【図11】線種の印刷属性を考慮しないピック処理の例を説明する図である。
【図12】文字列のフォントボックスによるピック処理の例を説明する図である。
【図13】要素種別によってピックしにくくなる例を示す図である。
【図14】入力座標により選択された可能性のある要素をリストに入れる処理を示す図である。
【図15】輪郭図形を抽出する処理を示す図である。
【図16】ピックウインドウの作成を示す図である。
【図17】ピックウインドウと要素の輪郭図形の干渉を検査することによってヒットの有無を判定する処理を示す図である。
【図18】重なった図形をピック処理がしやすいように一時的に図形をずらす処理を示す図である。
【図19】図1のステップS4の処理の詳細を示すフローチャートである。
【図20】図19のステップS4−1の処理の詳細を示すフローチャートである。
【図21】図19のステップS4−2の処理の詳細を示すフローチャートである。
【図22】図21のステップS4−2−3の処理の詳細を示すフローチャートである。
【図23】図1のステップS9の処理の詳細を示すフローチャートである。
【図24】図23のステップS9−3の処理の詳細を示すフローチャートである。
【図25】第2の実施形態においてステップS4−2−3として行われる処理の詳細を示すフローチャートである。
【図26】第3の実施形態においてステップS4−2−3として行われる処理の詳細を示すフローチャートである。
【図27】第4の実施形態においてステップS4−2−3として行われる処理の詳細を示すフローチャートである。
【図28】第5の実施形態においてステップS9として行われる処理の詳細を示すフローチャートである。
【図29】第5の実施形態において図28のステップS9−1Aとして行われる処理の詳細を示すフローチャートである。
【図30】第6の実施形態におけるピック処理の手順を示すフローチャートである。
[0001]
BACKGROUND OF THE INVENTION
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a drawing instruction apparatus and a drawing instruction method, for example, a drawing instruction for creating / printing graphics / character string data by interactive processing in an application such as CAD (Computer Aide Design) and DTP (Desk Top Publishing). The present invention relates to an apparatus and a drawing instruction method.
[0002]
[Prior art]
In work such as creating a template using a CAD or DTP application that has been used in the past and a high-precision printing device, the final print image desired by the operator is maintained and displayed on the display device. It is necessary to be able to perform high-precision pick (picking) processing based on the print image in an environment of editing while looking at the screen to be displayed, so-called WYSIWYG (What You See is What You Get) environment. Here, the pick process is a process of selecting a drawing element or pattern displayed on the display device in accordance with an arbitrary position on the display device designated by the operator using a pointing device such as a mouse.
[0003]
[Problems to be solved by the invention]
However, in pick processing performed in a conventional application such as CAD or DTP, simple geometric information or the like for drawing various patterns on a display is used without considering printing attributes such as line width and text. May be. In this case, when a line segment having a large line width is displayed as illustrated in FIG. 10, even if an end portion in the line width direction is picked, the line segment cannot be picked correctly, or FIG. When the one-dot chain line as illustrated is targeted, even if a portion without a line is picked, the drawing element of the one-dot chain line is selected, and further, as illustrated in FIG. Even if a portion other than is selected, the font box is selected if the selected portion is within the bounding rectangle that encloses the character “font box”.
[0004]
In addition, when drawing elements to be selected overlap as illustrated in FIG. 13, there is a problem that it is difficult to select a hidden element.
[0005]
SUMMARY An advantage of some aspects of the invention is that it provides a drawing instruction apparatus, a drawing instruction method, and a computer-readable storage medium that perform excellent pickability in consideration of printing attributes.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, a drawing instruction apparatus according to the present invention has the following configuration.
[0007]
That is, an element acquisition unit that extracts a drawing element that may be selected from the drawing elements that are being drawn based on the input coordinates instructed by the instruction unit, and an outline graphic in the display image of each drawing element is extracted. Based on the contour graphic acquisition means, the input coordinates and the contour graphic acquired by the contour graphic acquisition means, a hit determination means for determining a drawing element that is hit, and the hit determination means determines that it is hit A selection means for extracting the selected drawing element as the selected drawing element, and extracting the selected drawing element as the selected drawing element. The hit determination means is obtained by a pick window creating means for creating a pick window having a predetermined area based on the input coordinates, a pick window created by the pick window creating means, and the contour figure obtaining means. Interference picking means for judging whether or not the contour figure has interfered, wherein the pick window creating means corresponds to the size L of the pick window registered in advance in the coordinate system of the display device being used. Including size correction means for converting to a size L ′ It is characterized by that.
[0011]
In order to achieve the above object, a drawing instruction method according to the present invention is characterized by the following configuration.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments of a drawing instruction apparatus and a drawing instruction method according to the present invention will be described in detail with reference to the drawings.
[0016]
[First Embodiment]
[Description of hardware configuration]
FIG. 2 is a block diagram showing a hardware configuration of the drawing instruction apparatus according to the first embodiment of the present invention.
[0017]
In FIG. 2, a central processing unit (CPU) 21 performs overall control and arithmetic processing of the present apparatus. Reference numeral 11 denotes a keyboard through which an operator can input characters and numerical values. Reference numeral 12 denotes a mouse as an auxiliary input device for instructing coordinates and figures. A display device 41 such as a CRT displays graphic data and character data, various operation panels and buttons according to a software program executed by the CPU 21. That is, the keyboard 11, the mouse 12, and the display device 41 function as a man-machine interface in the present embodiment.
[0018]
Reference numeral 22 denotes a system bus, and all the hardware elements constituting this apparatus exchange programs and data via the system bus 22.
[0019]
Reference numeral 31 denotes a read-only storage device (ROM), and the program according to the present embodiment is stored in advance in the ROM 31, and the CPU 21 executes the program read from the ROM 31. Reference numeral 32 denotes a read / write storage device (RAM). During execution of the program according to the present embodiment, the CPU 21 performs processing while reading / writing data from / to the RAM 32 as necessary. Reference numeral 33 denotes an external storage device such as a floppy disk device (FD) or a hard disk device (HD), in which data such as character typeface information and code information is stored.
[0020]
The program according to the present embodiment may be stored in the external storage device 33, read into the RAM 32, and executed by the CPU 21, or data such as character typeface information and code information may be stored. The data may be stored in the ROM 31, and the CPU 21 may read and use the data as necessary.
[0021]
Reference numeral 51 denotes a laser printer as an example of a printing apparatus, which proof prints the print data created by this apparatus (output for confirming the print data) and outputs the contents of the print log file. An image setter 52 prints the print data created by this apparatus (high-precision output for an official composition). Reference numeral 53 denotes a laser marker, which prints the print data created by this apparatus directly on a product with a laser.
[0022]
Here, differences among the laser printer 51, the imagesetter 52, and the laser marker 53 will be described.
[0023]
The laser printer 51 is a printer that adsorbs toner to an electrostatic latent image formed on a photosensitive drum by irradiated laser light, and transfers and fixes the toner image on a recording paper. The resolution is 1500 DPI (dot / inch). ) To the extent possible. The imagesetter 52 is a printer that directly irradiates the photosensitive paper with laser light, and the resolution can be up to about 400 DPI. The paper size used for the imagesetter 52 can be up to about A1. The laser marker 53 is a printing device that directly irradiates a molded product with laser light to melt and blacken the resin material, or to develop a color using a special material containing a filler.
[0024]
Next, the display function according to the present embodiment will be described. The drawing instruction device according to the present embodiment has a so-called WYSIWYG function for performing control to display graphic data and character data on the display device 41 in the same display form image as the output form at the time of printing. FIG. 3 is a diagram for explaining this.
[0025]
FIG. 3A is a display example of WYSIWYG displayed on the display device 41, and the display form of FIG. 3A is substantially the same as the output form of FIG. 3C, which is an example of an output result at the time of printing. It is the same.
[0026]
On the other hand, FIG. 3B shows a display example that is not WYSIWYG, and the display form of FIG. 3B is an example of an output result at the time of printing. The display form of FIG. 3B is different from the output form of FIG. 3C, which is an example of an output result at the time of printing.
[0027]
Next, an operation screen on the display device 41 according to the present embodiment will be described.
[0028]
FIG. 4 is a diagram illustrating the main panel 61 displayed on the display device 41 when the pick processing program according to the present embodiment is executed.
[0029]
In FIG. 4, 61 is a main panel, 62 is a drawing area, 63 is a mouse pointer, 64 is a character input area, 65 is a button group, 66 is a general purpose button, 67 is a command menu, 68 is a guidance area, and 71 is other than the main panel. The panel 72 is a button on the panel 71. Further, these buttons on FIG. 4 are all soft keys.
[0030]
In response to an operator operating an input device such as the keyboard 11 or the mouse 12 on the main panel 61, the drawing instruction device according to the present embodiment interactively creates and edits print data. . The created print data is displayed in the drawing area 62.
[0031]
In addition to the main panel 61, various panels 71 may be displayed and operated on the panel 71 as necessary.
[0032]
Hereinafter, a method that can be input by the operator in the present embodiment via the software panel displayed on the display device 41 will be described with reference to FIG.
[0033]
When inputting from the keyboard 11, the operator inputs the character or numerical value after indicating the character input area 64 with the mouse 12 or the keyboard 11. Further, when inputting with the mouse 12, the following method is used.
[0034]
First, there are the following two methods (1) and (2) for selecting a specific element or button.
[0035]
(1) Element selection: The operator moves the mouse pointer 63 to a desired position of the drawing pattern (pattern displayed by the CPU 21 based on the print data) displayed in the drawing area 62, and at that position, For example, an element to be operated is selected by pressing the left mouse button.
[0036]
(2) Button selection: The operator places a mouse at predetermined positions of various buttons 65, general-purpose buttons 66, and various buttons 72 displayed in the panel 71 displayed as necessary, which are displayed on the main panel 61. By moving the pointer 63 and pressing the left mouse button at that position, for example, a button to be operated is selected.
[0037]
In addition, there are five methods (3) to (7) below for specifying a specific position on the drawing area 62.
[0038]
(3) Arbitrary designation: The position is designated by moving the mouse pointer 63 to an arbitrary position on the drawing area 62 and pressing the right mouse button at that position, for example.
[0039]
(4) Point designation: A position is designated by selecting an element of a point displayed in the drawing area 62.
[0040]
(5) Feature point designation: By selecting an element other than a point displayed in the drawing area 62, the CPU 21 extracts a point that is a feature of the element and designates a position.
[0041]
Here, when there are a plurality of feature points, a method for specifying one point includes a method in which the CPU 21 automatically extracts a feature point closest to the position of the mouse pointer 63 when an element is selected, and a plurality of feature points. There is a method of specifying one point from among the points.
[0042]
FIG. 5 shows an example of feature points of each element of graphic data. In the figure, the points indicated by * are characteristic points that characterize the shapes of various figures. That is, in FIG. 5, the specific positions of feature points characterizing various graphic data are as shown below.
・ Line segment: Both ends, midpoint,
・ Circle: Center point, intersection of the circle with the straight line drawn in the X and Y axis directions from the center of the circle (4 points),
-Arc: Center point, both end points, midpoint (point on the arc that bisects the arc distance),
Ellipse: Center point, short axis of ellipse and intersection of ellipse with ellipse (4 points),
・ Elliptic arc: center point, both end points, short axis of elliptical arc and intersection of major axis and ellipse including elliptical arc (4 points), middle point (point on elliptical arc that bisects elliptical arc distance),
Line segment: Both end points, midpoints of each line segment constituting the line segment sequence,
Free curve: Both end points, curve control points, and midpoints (points that bisect the free curve distance).
[0043]
(6) Intersection designation: By selecting one or two line elements such as line segments and circles displayed in the drawing area 62, the CPU 21 calculates the intersection of these elements, Specify the position.
[0044]
Here, when a single line element has its own intersection, that is, when it is self-intersecting, it is only necessary to select one line element. In other cases, two line elements are designated (see FIG. 6).
[0045]
When there are a plurality of intersections, a method for specifying one point includes a method in which the CPU 21 automatically extracts an intersection closest to the position of the mouse pointer 63 when an element is selected earlier or later, There is a method of specifying one point from the above.
[0046]
(7) Point designation on line: By selecting one line element such as a line segment or a circle displayed in the drawing area 62, a point on the line element closest to the position of the mouse pointer 63 at that time is selected. The CPU 21 calculates and designates the position.
[0047]
FIG. 7 shows an example in which an arc is selected as an element and a position is designated by line designation. FIG. 7 shows that the element selection is performed in the order of the line segment and the arc at the position indicated by the mark, and the position of the mark * is designated by the intersection point designation. The points marked with レ are points near the arc, and the points marked with * are points on the arc.
[0048]
Next, “commands” handled in this embodiment will be described. In this embodiment, each unit of print data creation and editing work is referred to as a “command”.
[0049]
Commands handled in this embodiment include commands for creating each element (plotting command) such as points, straight lines, circles, curves, etc., and commands for modifying the shape and attributes of each element, such as moving, copying, deleting, and attributes. (Modification command) and other commands such as file, print, register mark, bar code, etc.
[0050]
In order to create or edit print data by using the drawing instruction apparatus according to the present embodiment, first, an arbitrary command corresponding to a work unit is selected.
[0051]
To select a command, a method of inputting a command name from the keyboard 11 in the character input area 64 shown in FIG. 4 or a method of selecting a button 65 on the main panel 61 in which the command name is preset. Etc.
[0052]
When a command is selected by the operator, if there is a command that has already been selected, the command is terminated. Subsequently, initial processing of the newly selected command is performed, and processing in the command is started.
[0053]
When a command is selected, a command menu 67 for selecting a finer unit of work within the selected command is displayed on the display device 41. The user can perform various editing operations by selecting buttons of any menu item 67 in the command. An instruction as to what operation the user should perform is displayed in the guidance area 68 each time according to the work status, so the user may perform the operation according to this instruction.
[0054]
[data structure]
<Print data elements>
Next, specific types of graphic data and character data elements that constitute print data that can be generated by the drawing instruction apparatus according to the present embodiment will be described in detail.
[0055]
Elements of graphic data and character data that can be created by the drawing instruction apparatus according to the present embodiment are roughly classified into the following five types (A) to (E).
[0056]
(A) Basic figure: point, line segment, line segment sequence (open / closed), circle, arc, ellipse, elliptical arc, free curve (open / closed),
(B) a filled figure,
(C) Other figures: dragonfly, bar code,
(D) text,
(E) Group figure: symbol, illustration.
[0057]
The element here means a unit of data that is actually laid out as print data by adding an attribute (referred to as print attribute) necessary as print data to graphic data or character data. Further, if a plurality of elements laid out as print data are grouped together, they can be handled as one element. The element grouping method will be described later.
[0058]
Next, the five elements (A) to (E) will be described in detail.
[0059]
First, the basic figure (A) is the element of the most basic figure data. In addition, rectangles (rectangles whose sides are parallel to the X and Y axes), regular polygons, and the like configured by line segments can be handled as basic figure elements. In addition, as a free curve, expression formats such as Bezier, advantageous Bezier, B-spline, Hermite, and NURBS can be handled.
[0060]
The filled graphic of (B) is an element of graphic data in which a closed region is formed by connecting the elements (A) (excluding points) alone or by connecting a plurality of the elements of (A). . There are the following four types of painting methods.
[0061]
(1) Fill area: The inside is uniformly filled.
[0062]
(2) Hatching: Filling with a plurality of line segments having a certain inclination and interval. A specific point in the filled figure can be designated as a hatching reference point.
[0063]
(3) Mesh: Filled with repeated shapes of a certain shape such as a circle, rectangle, regular polygon, etc. A specific point in the filled figure can also be designated as a mesh reference point.
[0064]
(4) Pattern: Filled with repeated bit patterns created in advance.
[0065]
In addition, other figures in (C) include registration marks and bar codes. These elements include both graphic data and character data. A method for creating the registration mark and bar code elements will be described later.
[0066]
The text (D) is an element of character data. Like graphic data elements, it can be laid out as print data, but the type of printing attributes and the layout method are different from those of graphic data elements.
[0067]
Finally, (E) group figure, (A) basic figure, (B) filled figure, (C) other figure, and (D) text elements can be selected in any number of one or more. In order to handle them as a single element, there are symbols and illustrations.
[0068]
<Print attributes of print data>
Next, specific types of print attributes of graphic data and character data, which are print data that can be created by the drawing instruction apparatus according to the present embodiment, will be described.
[0069]
The print attributes of graphic data and character data that can be created are roughly classified into the following seven types (a) to (g).
[0070]
First, there are three types (a) to (c) shown below as print attributes common to graphic data and character data.
[0071]
(A) Display attribute: Designates whether or not to display an element, and what kind of vertical relation to display (referred to as display priority).
[0072]
(B) Selection attribute: Designates whether or not element selection is possible. If an element cannot be selected, operations on that element cannot be performed.
[0073]
(C) Color attribute: The color of an element is expressed by giving a color model type such as RGB or HLS and a color code value. When a monochrome printing device such as the display device 41 or the laser printer 51 that cannot express white and black I colors is used, the output is converted into either white or black according to the color attribute. Is done.
[0074]
Next, there are three types (d) to (f) shown below as printing attributes unique to graphic data.
[0075]
(D) Point attribute: In the case of a point element, a symbol or a character string can be displayed at a position where a point exists.
[0076]
(E) Line attributes: In the case of basic figure elements (line elements) other than points, the following various line attributes can be expressed.
[0077]
Line type: Indicates the shape of a line element, and includes a solid line, a broken line, a one-dot chain line, a two-dot chain line, and the like.
[0078]
Line width: Indicates the size of the line element in the normal direction. A predetermined type such as a thin line, a middle line, or a thick line can be designated, or can be designated with an actual size.
[0079]
Line width direction: Indicates whether the line width is offset in the normal direction from the case where the line width is not considered.
[0080]
-Termination shape: The shape of the end of an open figure such as a line segment or arc, round, flat, square, etc.
[0081]
-Connection shape: The shape of a corner of a figure such as a line segment or rectangle, such as miter, round, bevel, etc.
[0082]
Line pitch: When the line type is other than a solid line, the length of the part where the line exists and the part where the line does not exist can be given as actual dimensions or parameters, respectively.
[0083]
(F) Fill attribute: In the case of a filled graphic element (drawing element), the type of internal fill method such as fill area, hatching, mesh, pattern, etc., and detailed data required for hatching and mesh, and pattern Give the pattern number.
[0084]
Finally, there is only one type (g) shown below as print attributes unique to character data.
[0085]
(G) Character string attribute: In the case of a text element, the following various character attributes and attributes of the entire character string can be expressed.
・ Typeface: Design of a set of characters, such as Courier, Helvetica, Gothic, etc.
Character size: Represents the size of a character. In general, a rectangular area occupied by one character is equal to the height of the body in the line feed direction.
-Flatness ratio: Expresses the ratio of how much the character is reduced in the line feed direction.
-Length ratio: Expresses the ratio of how much the character is shortened in the character feed direction.
Base angle: represents the angle between the character feed direction and the X axis.
-Italic angle: Indicates the inclination angle of a character with respect to the character feed direction.
-Character spacing: Indicates the interval between two adjacent character bodies on the same line.
Line spacing: represents the spacing between character bodies in two adjacent lines.
-Character string reversal: The character string is reversed (mirror image) and displayed.
[0086]
<Data structure of print data>
Next, the data structure of the print data in this embodiment will be described.
[0087]
The print data in this embodiment is composed of the plurality of element data and the plurality of print attribute data described above.
[0088]
Here, each element data basically includes a data type code, a data number, necessary data for each element, and a data number of necessary printing attribute data for each element.
[0089]
The type of each element data in the print data can be specified by the data type code uniquely assigned in the print data.
[0090]
Each element data in the print data can be specified by a data number uniquely assigned in the print data. Although the types of necessary data and necessary print attributes differ for each element, the CPU 21 can identify these by the data type code.
[0091]
In addition, each print attribute is not held for each element data, but only the data number of necessary print attribute data is held for each element data. As a result, it is possible to avoid duplication of print attribute data, to reduce the capacity of print data, to change the print attributes of a plurality of element data in one operation, and the like.
[0092]
First, the data structure of each element of graphic data and character data is specifically shown below.
[0093]
(A) Basic figure:
(1) point
・ Data type code,
・ Data number,
-Point coordinates: c [2],
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
・ Data number of point attribute,
(2) Line segment
・ Data type code,
・ Data number,
・ Start point coordinates: s [2],
End point coordinate: e [2],
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
・ Data number of line attribute,
(3) Line segment
・ Data type code,
・ Data number,
-Number of passing points: np
-Each passing point coordinate: pp [2] (np),
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
・ Data number of line attribute,
(4) Yen
・ Data type code,
・ Data number,
-Center coordinates: c [2],
・ Radius: r,
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
・ Data number of line attribute,
(5) Arc
・ Data type code,
・ Data number,
・ Start point coordinates: s [2],
End point coordinate: e [2],
-Center coordinates: c [2],
・ Rotation direction flag (clockwise / counterclockwise),
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
・ Data number of line attribute,
(6) Ellipse
・ Data type code,
・ Data number,
-Center coordinates: c [2],
・ Long axis vector: a [2],
・ Short axis vector: b [2],
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
・ Data number of line attribute,
(7) Elliptic arc
・ Data type code,
・ Data number,
・ Start point coordinates: s [2],
End point coordinate: e [2],
-Center coordinates: c [2],
・ Long axis vector: a [2],
・ Short axis vector: b [2],
・ Rotation direction flag (clockwise / counterclockwise),
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
・ Data number of line attribute,
(8) Free curve (in the case of Bezier curve)
・ Data type code,
・ Data number,
-Number of curves: nv
・ Control point data for each curve (nv),
Number of control points: nc
Each control point coordinate: pc [2] (nc pieces),
Weight coefficient: w,
-Number of passing points: np
-Each passing point coordinate: pp [2] (np),
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
・ Data number of line attribute,
(B) Filled figure:
・ Data type code,
・ Data number,
Layout base rectangle lower left point coordinates: p1 [2],
Layout base rectangle lower right point coordinates: p2 [2],
・ Number of loops: nl
-Each loop component data (nl):
Number of components: nd
Constituent element data: Basic figure element data (nd) excluding points,
・ Pass reference point coordinates: pp [2],
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
・ Data number of fill attribute,
・ Data number of frame display attribute,
-Data number of the color attribute of the frame,
-Data number of the line attribute of the frame.
[0094]
Here, the filled figure has a print attribute for the frame of the filled figure in addition to the print attribute inside the filled figure as a print attribute. For example, the internal color attribute and the frame color attribute can be changed for display.
[0095]
(C) Other figures:
(1) Dragonfly,
・ Data type code,
・ Data number,
-Register mark type flag (register mark / scale register mark),
-Registration mark shape flag (11 types for registration marks / 3 types for scale registration marks)
・ Register mark offset flag (with / without offset),
・ Print data name (for scale marks),
・ Registration mark length (for scale registration marks),
Layout reference point coordinates: pb [2],
Output magnification: sc,
Layout base rectangle lower left point coordinates: p1 [2],
Layout base rectangle lower right point coordinates: p2 [2],
-Number of components: nd
-Component data: In the case of a registration mark, the line of a scale mark, the bar of a scale registration mark is element data (nd number) of a line, circle, or text,
(2) Bar code,
・ Data type code,
・ Data number,
・ Barcode type flags (4 types)
・ Code data,
・ Code display flag (with / without code display),
-Layout reference position flags (9 types, including lower left / center / upper right),
Layout reference point coordinates: pb [2],
・ Layout angle: ang,
Layout scale: sc,
Layout base rectangle lower left point coordinates: p1 [2],
-Layout reference rectangle upper right point coordinates: p2 [2],
-Number of components: nd
-Component data: Element data (nd) of either line segment or text,
(D) Text:
(1) Basic character strings (elements constituting text),
・ Data type code,
・ Data number,
-Character string start point coordinates: pt [2],
-Number of character string bytes: nch
-Character string data: str (nch bytes),
・ Layout angle: ang,
Layout scale: sc,
・ Data number of display attribute,
・ Data number of selection attribute,
・ Data number of color attribute,
-String attribute data number,
(2) Text
・ Data type code,
・ Data number,
-Layout reference position flags (9 types, including lower left / center / upper right),
Layout reference point coordinates: pb [2],
Layout base rectangle lower left coordinates: p1 [2],
Layout base rectangle upper right coordinate: p2 [2],
-Number of components: nd
Component data: Element data (nd number) of basic character string.
[0096]
Here, the text element is configured by combining a plurality of basic character string elements. This makes it possible to handle a character string having a plurality of character string attributes in one text element. For example, it is possible to change the typeface of a character in the middle of one text or to control the height and width of a character.
[0097]
(E) Group figure:
(1) Symbol
・ Data type code,
・ Data number,
Folder name,
・ File name,
-Layout reference position flags (9 types, including lower left / center / upper right),
Layout reference point coordinates: pb [2],
・ Layout angle: ang,
Layout scale: sc,
Layout base rectangle lower left point coordinates: p1 [2],
-Layout reference rectangle upper right point coordinates: p2 [2],
・ Inversion flag (with / without inversion),
-Line width scale flag (with / without line width scale),
・ Line width scale value,
(2) Illustration
・ Data type code,
・ Data number,
Folder name,
・ File name,
-Layout reference position flags (9 types, including lower left / center / upper right),
Layout reference point coordinates: pb [2],
・ Layout angle: ang,
Layout scale: sc,
Layout base rectangle lower left point coordinates: p1 [2],
-Layout reference rectangle upper right point coordinates: p2 [2],
・ Inversion flag (with / without inversion),
-Number of components: nd
Component data: Arbitrary element data (nd number).
[0098]
The features of the symbol and illustration data structures and the file structure of the symbol data file and illustration data file will be described later.
[0099]
Next, the data structure of the print attribute data corresponding to the element data having the data structure as described above will be described.
[0100]
Here, each print attribute data basically has a configuration of a data type code, a data number, an attribute setting flag, and necessary data for each print attribute. The type of each print attribute data in the print data can be specified by a data type code uniquely assigned in the print data.
[0101]
Each print attribute data in the print data can be specified by a data number uniquely assigned in the print data. Although the necessary data is different for each print attribute, the CPU 21 can identify these by the data type code.
[0102]
The attribute setting flag is a flag that specifies whether or not the printing attribute data is valid. In the element data indicating the print attribute data for which the attribute setting flag is valid, the element is displayed according to the corresponding print attribute data.
[0103]
On the other hand, in the element data indicating the print attribute data for which the attribute setting flag is invalid, it is assumed that the corresponding print attribute is not set, and the default data stored in advance in the ROM 31 or the external storage device 33 is assumed. Elements are displayed according to print attributes.
[0104]
In addition, when each element data has a data structure that can have a hierarchical relationship, it is possible to perform control according to the printing attributes of the upper (or lower) elements.
[0105]
Next, the data structure of each print attribute data is specifically shown.
[0106]
(A) Display attribute
・ Data type code,
・ Data number,
・ Attribute setting flag (valid / invalid),
・ Display flag (display / non-display),
・ Display priority,
(B) Selection attribute
・ Data type code,
・ Data number,
・ Attribute setting flag (valid / invalid),
-Element selection flag (possible / impossible),
(C) Color attribute
・ Data type code,
・ Data number,
・ Attribute setting flag (valid / invalid),
-Color code identification flag (RGB / HLS),
Color code 1, 2, 3,
(D) Point attribute
・ Data type code,
・ Data number,
・ Attribute setting flag (valid / invalid),
・ Marker string,
(E) Line attribute
・ Data type code,
・ Data number,
・ Attribute setting flag (valid / invalid),
-Line type flag (solid line / broken line / dashed line / two-dot chain line / arbitrary dashed line / arbitrary alternate long and short dash line / arbitrary two-dot chain line),
Line width flag (thin line / medium line / thick line / extremely thick line / arbitrary line width),
・ Line direction flag (center / inside / outside),
・ Terminal shape flag (round / flat / square),
・ Connection shape flag (Miter / Round / Bevel),
Line type data 1, 2, 3, 4 (when line type = arbitrary),
-Line width data (when line width = arbitrary),
(F) Fill attribute
・ Data type code,
・ Data number,
・ Attribute setting flag (valid / invalid),
・ Fill type flag (filled / not filled / hatched / mesh number / pattern number, etc.),
-Number of data groups: nd,
・ Filling data 1, 2, 3 (nd),
(G) Character string attribute
・ Data type code,
・ Data number,
・ Attribute setting flag (valid / invalid),
・ Typeface,
·font size,
・ Flat body ratio,
・ Length ratio,
・ Base angle,
・ Italic angle,
・ Character spacing,
・ Line spacing,
-Character string inversion flag (Yes / No).
[0107]
FIG. 8 shows an example of a print data file created by the drawing instruction apparatus according to the present embodiment based on the data structure of the print data described above.
[0108]
The print data shown in FIG. 8 is print data for printing a figure having a shape as shown in FIG. 9, and the figure represented by the print data shown in FIG. 9 is an element of a plurality of types of basic figures. It consists of one line segment row, two circles, and two points of the lower left point and upper right point of the circumscribed rectangle of these three elements (the two points are not displayed and cannot be selected). These one line section row and two circles have the same display attribute (display), selection attribute (selectable), line attribute (solid line, line width 20 mm), and different color attributes. It shall be.
[0109]
<Data structure of group figure>
Next, among the data structures of the print data described above, the data structures of symbols and illustrations, which are group graphics, will be described in detail.
[0110]
First, the data structure of the symbol will be described.
[0111]
In the present embodiment, a symbol is a figure that is repeatedly used, such as a symbol defined by a standard or a logo mark, and is a graphic data element (line segment, circle, etc.) or character data element (text). Is an element created by combining
[0112]
When the content of the symbol data file is updated due to a change in the standard, etc., in this embodiment, all the corresponding symbols already laid out as part of the print data are updated to maintain data synchronization. can do. That is, the drawing instruction apparatus according to the present embodiment holds symbol data in the following data structure.
[0113]
In the print data, only the folder name and file name for specifying the location of the symbol data file and information necessary for laying out the symbols are stored.
[0114]
Also, a symbol data file is created separately from the print data file in which the print data is saved in the file. The symbol data file has the following file structure.
Layout base rectangle lower left point coordinates: p1 [2],
-Layout reference rectangle upper right point coordinates: p2 [2],
・ Component data: Arbitrary element data (plural)
Print attribute data: Necessary print attribute data (plural).
[0115]
Although the layout reference rectangle will be described later, if the layout reference rectangle is determined, it is possible to specify information on the position and size necessary for laying out symbols as print data. For example, as the layout reference rectangle, it is possible to designate a minimum rectangle (referred to as a circumscribed rectangle) surrounding the visible portion of the symbol.
[0116]
If the circumscribing rectangle data of the corresponding symbol is registered as the layout reference rectangle when creating the symbol data file, there is no need to recalculate the circumscribing rectangle of the symbol when the symbol data file is read again.
[0117]
Each component data of the symbol is expressed by a relative coordinate value with respect to the lower left point of the layout reference rectangle.
[0118]
For each print attribute data, as in the case of print data, the print attribute data necessary for displaying each component data is stored separately from the element data.
[0119]
As described above, in the present embodiment, even if the print data file including the changed symbol is not intentionally updated, the print data file in the print data can be simply read from the external storage device 33 into the RAM 32. The symbol data is automatically updated to the contents of the latest symbol data file, and the data can be automatically synchronized.
[0120]
Next, the data structure of an illustration which is another group figure will be described.
[0121]
In this embodiment, an illustration is a figure that is repeatedly used, such as a template figure. This is also a combination of graphic data elements (line segments, circles, etc.) and character data elements (text) like symbols. Are created.
[0122]
Unlike the case of the symbol described above, the illustration is used when it is desired to make changes freely without being synchronized with the contents of the original illustration data file after it has been laid out as part of the print data. .
[0123]
Therefore, in the case of illustration data, unlike the automatic update of symbol data described above, even if the contents of the illustration data file are updated, the corresponding illustration already laid out as part of the print data is updated. There is no synchronization.
[0124]
Therefore, in the drawing instruction apparatus according to the present embodiment, illustration data is held in the following data structure.
[0125]
In other words, in the print data, in addition to the folder name and file name for specifying the location of the illustration data file, and the information necessary to lay out the illustration, the illustration read from the illustration data file is actually configured. Each element data to be held is held.
[0126]
Also, an illustration data file is created separately from the print data file. The illustration data file has the following file structure.
Layout base rectangle lower left point coordinates: p1 [2],
-Layout reference rectangle upper right point coordinates: p2 [2],
・ Component data: Arbitrary element data (plural)
Print attribute data: Necessary print attribute data (plural).
[0127]
This structure is the same as the file structure of the symbol data file. When reading this into the print data, the specified layout reference point coordinates are used as the origin, and each component data in the illustration data file is expanded (coordinate converted) according to the specified layout angle and layout scale. The illustration element data is different from the symbol in that it is all retained.
[0128]
[Pick processing]
Next, pick processing executed by the drawing instruction apparatus shown in FIG. 2 in order to realize the above-described drawing control will be described.
[0129]
FIG. 1 is a flowchart showing a pick processing procedure in the first embodiment, which is executed by the CPU 21.
[0130]
In the figure, in the environment of step S1: WYSIWIG, the input coordinate pointed out by the operator using the mouse 12 or the like while looking at the display device 41 is taken out (see FIG. 14), and the coordinate value is read and written to the storage device 32. Alternatively, it is stored in an external storage device 33 (hereinafter collectively referred to as a storage device).
[0131]
Step S2: Based on the coordinate value stored in Step S1 and the display position data of the element graphic displayed on the display device 41, the element graphic that may be selected by the operator is determined, and the possibility of selection may be determined. An identification number or the like indicating a certain element graphic is stored in the storage device as a selectable element list and is taken out in order (see FIG. 14).
[0132]
Step S3: In accordance with the identification numbers of the graphic elements taken out in order in step S2, the contour graphic is calculated based on the geometry and attribute data of each graphic element stored in advance and stored in the storage device (see FIG. 15). ).
[0133]
Step S4: It is determined whether or not there is a hit based on the input coordinates saved in Step S1 and the contour graphic information saved in Step S3.
[0134]
Here, details of the processing in step S4 will be described with reference to FIG.
[0135]
In FIG. 19, step S4-1: A pick window (region having a predetermined area) is created based on the input coordinates (see FIG. 16). The pick window creation procedure may be performed according to the flowchart shown in FIG.
[0136]
In FIG. 20, step S4-1-1: The side length input by the storage device or the operator is acquired as the side length L of the pick window.
[0137]
Step S4-1-2: The display device 41 has a predetermined length. The side length L is converted to L ′. Specifically, when the display coordinate system is enlarged and displayed on the display device 41, a predetermined length L reflecting the side length L on the display device by processing such as dividing the side length L by the scale value. Convert to '.
[0138]
Step S4-1-3: A square having a side length L ′ calculated in Step S4-1-2 with the input coordinates as the center is set as a pick window.
[0139]
Next, returning to the description of FIG. 19, step S4-2: It is determined whether the pick window obtained as described above interferes with the contour figure obtained in step S3 (see FIG. 17).
[0140]
Steps S4-3 to S4-5: In step S4-2, if there is interference, it is determined that there is a hit. If there is no interference, it is determined that there is no hit.
[0141]
The specific procedure in step S4-2 may be performed according to the flowchart shown in FIG.
[0142]
In FIG. 21, step SS 4-2-1: a circumscribed rectangle of the contour figure of the display image taking out the attribute of each element and the like is extracted.
[0143]
Step S4-2-2: It is checked whether the pick window interferes with the circumscribed rectangle of the contour figure obtained as described above. Since the purpose of this step is to check whether the interference is rough with a small amount of calculation, it may be obtained geometrically in consideration of the printing attributes.
[0144]
Steps S4-2-3 to S4-2-6: If it is determined that there is no possibility of interference, it is determined that there is no hit in Step S4-2-6, and if it is determined that there is a possibility of interference, Step S4 In 2-2-4, it is checked whether the pick window and the circumscribed rectangle of the contour graphic actually interfere with each other using the contour graphic data. In step S4-2-5, the hit is identified according to the result. To do. Here, a more specific procedure will be described later with reference to FIG.
[0145]
In FIG. 22, step S4-2-3-1: A bitmap image of the display image when the contour graphic is displayed on the display device 41 is calculated.
[0146]
Step S4-2-3-2: A bitmap image of the display image when the pick window is displayed on the display device 41 is calculated.
[0147]
Step S4-2-3-3: It is checked whether each pixel is interfering in the bitmap image of the contour graphic and the pick window obtained as described above. This can be done by taking the logical product of each pixel.
[0148]
Steps S4-2-3-4 to S4-2-3-6: If even one pixel interferes, it is determined that there is a hit, and if no pixel interferes, it is determined that there is no hit.
[0149]
Here, the description returns to FIG. Steps S5 to S6: The elements determined to be hit in step S4 described above are stored in the storage device as selected element candidates.
[0150]
Step S7: It is determined whether or not there are still registered selection elements. If there are, the process returns to Step S3 and the above-described processing from Step S3 to Step S6 is performed for the remaining selected elements. .
[0151]
Steps S8 to S10: It is determined whether there is a selection element candidate (step S8). If there is a selection element, the selection element is determined based on a certain criterion among the hit elements (step S9). (Step S10).
[0152]
Here, details of the processing in step S9 will be described with reference to FIG.
[0153]
In FIG. 23, Step S9-1: Search for the highest priority element among the hit elements. It is assumed that priorities are set in advance for each element.
[0154]
As a result of the search, if there are a plurality of elements having the highest priority, the following processing (S8-2) and the following processing is performed.
[0155]
Step S9-2, Step S9-6: As a result of the search, it is determined whether there are a plurality of elements having the highest priority (step S9-2). If there is only one element, the element is determined in step S9-6. As a selection element.
[0156]
Step S9-3: As a result of the determination in step S9-2, there are a plurality of elements having the highest priority. Therefore, the plurality of elements having the highest priority obtained as described above are classified for each element type, The one having the highest priority according to the priority set for each type is searched.
[0157]
In addition, as the priority for each element type, the highest priority is given to the dots, the lowest priority is given to the filled figure, and the other priority is the others. The reason for this is that the point is generally hidden behind other elements and difficult to select, so the filled figure hides other elements and is easy to select. This makes it easier to select various types of elements equally. (See Figure 13)
A more specific procedure of step S9-3 may be performed as shown in the flowchart of FIG.
[0158]
In FIG. 24, Step S9-3-1 to Step S9-3-2: Search for an element type of point, and if there is a point, take it out. If there is no point, the process proceeds to step S9-3-4 and subsequent steps.
[0159]
Step S9-3-4 to Step S9-3-7: If the element type is not a filled figure, and if there is a non-filled figure, the figure is taken out in step S9-3-3. On the other hand, if there is no non-filled figure, the filled figure is taken out in step S9-3-7.
[0160]
Step S9-4: As a result of searching in step S9-3, it is determined whether there are a plurality of elements. If there are a plurality of elements, the process proceeds to step S9-5. If there is only one element, the process proceeds to step S9-6. The element is selected.
[0161]
Step S9-5: The selected figure is determined according to the order of the drawing list. Here, the drawing priority of each element is managed by a list. In this list, for example, the first one is drawn first, and the first one is written later. As a result, the one behind the list is displayed as displayed on the near side for the operator of the display device 41. At this time, if there are a plurality of selected candidate elements, the element on the foremost side will be selected if the last one in the drawing list is selected.
[0162]
According to the first embodiment as described above, pick processing with excellent operability and considering print attributes is realized.
[0163]
[Second Embodiment]
Next, a second embodiment based on the drawing instruction apparatus according to the first embodiment described above will be described. In the following description, the description similar to that of the first embodiment will be omitted, and the description will focus on the characteristic part of the present embodiment.
[0164]
The drawing instruction apparatus according to the present embodiment is different from the first embodiment in which the process in step S4-2-3 is performed according to the flowchart shown in FIG. 25 according to the flowchart shown in FIG.
[0165]
In FIG. 25, step S4-2-3-1A to step S4-2-3-3A: Check whether the element data and the pick window geometrically interfere with each other, and check whether the element data and the pick window interfere geometrically. Is calculated and obtained (step S4-2-3-1A). As a result, if it is determined that there is interference, it is determined that a hit has been made (step S4-2-3-3A). If it is determined that there is no interference, it is determined that there is no hit (step S4-2-3-3). 4A).
[0166]
Also according to this embodiment, substantially the same effect as that of the first embodiment can be obtained.
[0167]
[Third Embodiment]
Next, a third embodiment based on the drawing instruction apparatus according to the first embodiment described above will be described. In the following description, the description similar to that of the first embodiment will be omitted, and the description will focus on the characteristic part of the present embodiment.
[0168]
The drawing instruction apparatus according to the present embodiment is different from the first embodiment in which the process in step S4-2-3 is performed according to the flowchart shown in FIG. 26 according to the flowchart shown in FIG.
[0169]
In FIG. 26, step S4-2-3-1B: The sum of the rectangles of the font boxes of each character constituting the character string is calculated as a font box.
[0170]
Step S4-2-3-2B: Check whether the pick window and the rectangle obtained in Step S4-2-3-1B geometrically interfere with each other (Step S4-2-3-3-3B). If it is determined that there is a hit, it is determined that there is a hit (step S4-2-3-4B), and if it is determined that there is no interference, it is determined that there is no hit (step S4-2-3-5B).
[0171]
Also according to this embodiment, substantially the same effect as that of the first embodiment can be obtained.
[0172]
[Fourth Embodiment]
Next, a fourth embodiment based on the drawing instruction apparatus according to the first and second embodiments described above will be described. In the following description, the description similar to that of the first embodiment will be omitted, and the description will focus on the characteristic part of the present embodiment.
[0173]
The drawing instruction apparatus according to the present embodiment is different from the first embodiment in which the process in step S4-2-3 is performed according to the flowchart shown in FIG. 27 according to the flowchart shown in FIG.
[0174]
In FIG. 27, step S4-2-3-1C: Estimates the data amount of the contour figure of the image when the element is displayed. At this time, if the amount of data is too large, the interference determination by the image bitmap uses a lot of resources and the calculation cost is high, so the amount of data is first estimated from the original element data.
[0175]
Steps S4-2-3-2C to S4-2-2-3C: The amount of data estimated in Step S4-2-3-1C is compared with a predetermined amount (Step S4-2-3-3C). As a result, when the data amount is smaller than the predetermined amount, each pixel of each bitmap image of the contour graphic and the pick window is the same as step S4-2-3-2 (FIG. 22) in the first embodiment described above. Hit processing is performed by performing interference determination for each (step S4-2-3-3-3C). On the other hand, when the estimated data amount is equal to or smaller than the predetermined amount, interference determination is performed geometrically by the same procedure as that of the flowchart of FIG. 25 in the second embodiment described above (step S4-2-3-4C).
[0176]
Interference determination using a bitmap can perform precise interference determination in consideration of printing attributes, etc., although resources and calculation costs are used. On the other hand, the geometrical interference determination can be performed with a small amount of resources and a low calculation cost, although the accuracy is slightly impaired. According to this embodiment, the above two processes are adaptively switched by estimating the data amount of the contour graphic of the display image of the first element.
[0177]
Also according to this embodiment, substantially the same effect as that of the first embodiment can be obtained.
[0178]
[Fifth Embodiment]
Next, a fifth embodiment based on the drawing instruction apparatus according to the first embodiment described above will be described. In the following description, the description similar to that of the first embodiment will be omitted, and the description will focus on the characteristic part of the present embodiment.
[0179]
The drawing instruction apparatus according to the present embodiment is different from the first embodiment in which the process in step S9 is performed according to the flowchart shown in FIG. 28 according to the flowchart shown in FIGS.
[0180]
In FIG. 28, step S9-1A: the selection element candidates overlap each other and the operator may have difficulty in selection, so that the selection element candidates are temporarily shifted in position so as not to overlap temporarily (FIG. 28). 18). A more specific procedure may be performed according to the flowchart shown in FIG. 29, for example.
[0181]
In FIG. 29, Step S9-1A-1, Step S9-1A-2: A circumscribed rectangle of each overlapping element is calculated, and an appropriate distance indicating the distance between the elements when the overlapping graphic is displayed while being shifted is displayed. Set the margin value.
[0182]
Step S9-1A-3: The circumscribed rectangle of each element around the input coordinates can be arranged vertically and horizontally with the circumscribed rectangle of the other elements by the margin value set in step S9-1A-2. The movement amount of each figure is calculated.
[0183]
Step S9-1A-4, Step S9-1A-5: It is determined whether all the graphic elements that are the selection element candidates can be accommodated in the screen. As a result of the determination, if all the graphic elements are accommodated, step S9-1A- If not, the step S9-1A-5 allows a negative value, and recalculates the movement amount of each figure so that the margin value is reduced to fit within the screen. Alternatively, the display scale of the screen is reduced so that all the elements that are the selection element candidates can fit within the screen.
[0184]
Step S9-1A-6: Each figure is temporarily rearranged according to the obtained movement amount.
[0185]
Next, returning to the description of FIG. Step S9-2A: Each graphic element whose display position is temporarily shifted as described above is temporarily put into a special display state such as high-intensity display, special color display, or blinking so that the operator can easily understand.
[0186]
Step S9-3A: Coordinates are input by a pointing device such as the mouse 12 so that the operator can select a desired graphic element from the selection element candidates displayed as described above.
[0187]
Steps S9-4A to S9-7A: In this embodiment, a pick process that does not have the premise that there are a plurality of selection elements as described in the first embodiment is performed. That is, if there is a selected figure as a result of the pick process, it is set as the selected figure (step S9-6A). On the other hand, if there is no selected figure, error processing such as causing the user to input again as an error is performed (step S9-7A).
[0188]
Step S9-8A: The element in the special display state is temporarily shifted in the process of Step S9-2A to return to the original state.
[0189]
Also according to this embodiment, substantially the same effect as that of the first embodiment can be obtained.
[0190]
[Sixth Embodiment]
Next, a sixth embodiment based on the drawing instruction apparatus according to the first embodiment described above will be described. In the following description, the description similar to that of the first embodiment will be omitted, and the description will focus on the characteristic part of the present embodiment.
[0191]
FIG. 30 is a flowchart showing the procedure of pick processing in the sixth embodiment. Steps S1 to S6 perform the same processing as steps S1 to S6 of FIG. 1 in the first embodiment. That is, if at least one graphic element is hit in step S6, that graphic element is set as the selected element. This enables a quick selection process.
[0192]
Step S11, Step S12: If there is no hit in the determination in step S5, it is determined in step S11 whether there is a graphic element that may still be selected, as in step S7 in FIG. As a result of the determination, when there is a graphic element that may still be selected, the process returns to step S2, and when there is no graphic element, it is determined that there is no selected element in step S12.
[0193]
Also according to this embodiment, substantially the same effect as that of the first embodiment can be obtained.
[0194]
According to each of the embodiments described above, pick processing with excellent operability and considering print attributes is realized. Also, although pick processing is usually performed based on display data including precise print attributes according to the amount of calculation resources of the drawing instruction device, pick processing is performed with simple processing when the amount of resources is insufficient. Thus, appropriate processing according to the situation can be performed.
[0195]
[Other Embodiments]
An object of the present invention is to supply a storage medium (or recording medium) that records a program code of software that implements the functions of the above-described embodiments to a system or apparatus, and to perform a computer (or CPU or CPU) of the system or apparatus. (MPU) can also be achieved by reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. A case where part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing is also included.
[0196]
Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is determined based on the instruction of the program code. This includes a case where the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
[0197]
【The invention's effect】
As described above, according to the present invention, it is possible to provide a drawing instruction apparatus, a drawing instruction method, and a computer-readable storage medium that perform pick processing with excellent operability and taking print attributes into consideration.
[Brief description of the drawings]
FIG. 1 is a flowchart illustrating a pick processing procedure;
FIG. 2 is a block diagram showing a hardware configuration of a drawing instruction apparatus according to the first embodiment of the present invention.
FIG. 3 is a diagram illustrating functions of WYSIWYG.
FIG. 4 is a diagram illustrating a main panel 61 displayed on the display device 41 when the pick processing program according to the first embodiment is executed.
FIG. 5 is a diagram illustrating feature points of each element.
FIG. 6 is a diagram illustrating an example of position designation by intersection designation.
FIG. 7 is a diagram showing an example of position designation by line point designation.
FIG. 8 is a diagram illustrating an example of a print data file.
FIG. 9 is a diagram illustrating an example of symbols.
FIG. 10 is a diagram illustrating an example of pick processing that does not consider the print attributes of the line width / end point attributes;
FIG. 11 is a diagram illustrating an example of pick processing that does not consider line type print attributes;
FIG. 12 is a diagram illustrating an example of pick processing by a font box of a character string.
FIG. 13 is a diagram illustrating an example in which picking is difficult depending on the element type.
FIG. 14 is a diagram illustrating a process of putting an element that may be selected by input coordinates into a list.
FIG. 15 is a diagram illustrating processing for extracting a contour graphic.
FIG. 16 is a diagram illustrating creation of a pick window.
FIG. 17 is a diagram illustrating processing for determining the presence or absence of a hit by inspecting interference between a pick window and an element outline graphic.
FIG. 18 is a diagram illustrating a process of temporarily shifting a graphic so that it is easy to perform a pick process on an overlapping graphic.
FIG. 19 is a flowchart showing details of the process in step S4 of FIG. 1;
FIG. 20 is a flowchart showing details of the process in step S4-1 in FIG.
FIG. 21 is a flowchart showing details of the process in step S4-2 in FIG. 19;
FIG. 22 is a flowchart showing details of the process in step S4-2-3 of FIG.
FIG. 23 is a flowchart showing details of the process in step S9 of FIG. 1;
24 is a flowchart showing details of the process in step S9-3 in FIG.
FIG. 25 is a flowchart showing details of processing performed as Step S4-2-3 in the second embodiment.
FIG. 26 is a flowchart showing details of processing performed as step S4-2-3 in the third embodiment.
FIG. 27 is a flowchart showing details of processing performed as step S4-2-3 in the fourth embodiment.
FIG. 28 is a flowchart showing details of processing performed as step S9 in the fifth embodiment.
FIG. 29 is a flowchart showing details of processing performed as step S9-1A in FIG. 28 in the fifth embodiment.
FIG. 30 is a flowchart illustrating a pick processing procedure according to the sixth embodiment;

Claims (11)

描画中の描画要素の中から、選択された可能性のある描画要素を、指示部により指示された入力座標に基づいて取り出す要素取得手段と、
各描画要素の表示イメージにおける輪郭図形を取り出す輪郭図形取得手段と、
前記入力座標と前記輪郭図形取得手段によって取得した輪郭図形とに基づいて、ヒットしている描画要素を判定するヒット判定手段と、
前記ヒット判定手段によってヒットしていると判定された描画要素を、選択された描画要素の候補として抽出すると共に、抽出された候補の中から何れかの描画要素を、該選択された描画要素として決定する選択手段と、
を備え
前記ヒット判定手段は、
前記入力座標に基づいて、所定の面積を有するピックウインドウを作成するピックウインドウ作成手段と、
前記ピックウインドウ作成手段によって作成されたピックウインドウと、前記輪郭図形取得手段によって取得した輪郭図形とが干渉しているかを判定する干渉判定手段と、
を含み、
前記ピックウインドウ作成手段は、予め登録された前記ピックウインドウのサイズLを、使用している表示装置の座標系に対応するサイズL’に変換するサイズ補正手段を含む
ことを特徴とする描画指示装置。
An element acquisition unit that extracts a drawing element that may be selected from the drawing elements that are being drawn based on the input coordinates instructed by the instruction unit;
A contour graphic acquisition means for extracting a contour graphic in the display image of each drawing element;
Hit determining means for determining a drawing element that is hit based on the input coordinates and the contour graphic acquired by the contour graphic acquiring means;
A drawing element determined to be hit by the hit determination means is extracted as a selected drawing element candidate, and any drawing element from the extracted candidates is selected as the selected drawing element. A selection means to determine;
Equipped with a,
The hit determination means includes
Pick window creating means for creating a pick window having a predetermined area based on the input coordinates;
Interference determining means for determining whether the pick window created by the pick window creating means interferes with the contour graphic acquired by the contour graphic acquiring means;
Including
The pick window creation means includes size correction means for converting a size L of the pick window registered in advance into a size L 'corresponding to a coordinate system of a display device being used. A drawing instruction device.
前記ヒット判定手段は、ヒットしていないと判定した場合、選択された可能性のある描画要素がまだ存在するかを判定することを特徴とする請求項1記載の描画指示装置。The hit judging means when it is determined that it is not hit, the drawing instruction device according to claim 1, characterized in that determining whether drawing elements that may have been selected are still present. 前記ピックウインドウは正方形の形状を有しており、前記サイズは該正方形の辺長により規定されることを特徴とする請求項1に記載の描画指示装置。  The drawing instruction apparatus according to claim 1, wherein the pick window has a square shape, and the size is defined by a side length of the square. 前記干渉判定手段は、
表示イメージの輪郭図形の外接矩形を取り出す外接矩形取得手段と、
前記ピックウインドウ作成手段によって作成されたピックウインドウと、前記外接矩形取得手段によって取得した外接矩形とが干渉しているかを判定する第1干渉判定手段と、
前記輪郭図形と前記ピックウインドウとが干渉しているかを判定する第2干渉判定手段と、
を含むことを特徴とする請求項1に記載の描画指示装置。
The interference determination means includes
Circumscribed rectangle obtaining means for extracting a circumscribed rectangle of the contour figure of the display image;
First interference determining means for determining whether the pick window created by the pick window creating means interferes with the circumscribed rectangle acquired by the circumscribed rectangle acquiring means;
Second interference determination means for determining whether the contour graphic and the pick window interfere with each other;
The drawing instruction apparatus according to claim 1, further comprising:
前記第2干渉判定手段は、
前記表示イメージのビットマップイメージを算出する第1ビットマップイメージ取得手段と、
前記ピックウインドウのビットマップイメージを算出する第2ビットマップイメージ取得手段と、
前記第1及び第2ビットマップイメージ取得手段によって取得した各ビットマップイメージにおいて、各画素毎に干渉しているかを判定するビットマップイメージ干渉判定手段と
を含み、
前記ヒット判定手段は、前記ビットマップイメージ干渉判定手段によって少なくとも一画素が干渉していると判定された場合、ヒットしていると判定する
ことを特徴とする請求項4に記載の描画指示装置。
The second interference determination means includes
First bitmap image acquisition means for calculating a bitmap image of the display image;
Second bitmap image acquisition means for calculating a bitmap image of the pick window;
In each bitmap image acquired by the first and second bitmap image acquisition means, bitmap image interference determination means for determining whether each pixel interferes,
The drawing instruction apparatus according to claim 4, wherein the hit determination unit determines that a hit has occurred when the bitmap image interference determination unit determines that at least one pixel interferes.
前記第2干渉判定手段は、要素データと前記ピックウインドウとが幾何学的に干渉しているかを判定しており、
前記ヒット判定手段は、前記第2干渉判定手段によって幾何学的に干渉していると判定された場合、ヒットしていると判定する
ことを特徴とする請求項4に記載の描画指示装置。
The second interference determining means determines whether element data and the pick window are geometrically interfering with each other,
The drawing instruction apparatus according to claim 4, wherein the hit determination unit determines that a hit has occurred when the second interference determination unit determines that there is a geometric interference.
前記第1及び第2干渉判定手段は、
描画要素が文字列の場合、前記文字列の各文字のフォントボックスの矩形の和を求める文字列フォントボックス算出手段と、
前記ピックウインドウと、前記フォントボックスとが干渉しているか判定するフォントボックス干渉判定手段と
を含み、前記ヒット判定手段は、前記フォントボックス干渉判定手段によって干渉していると判定された場合、ヒットしていると判定する
ことを特徴とする請求項6に記載の描画指示装置。
The first and second interference determination means are
When the drawing element is a character string, a character string font box calculation means for obtaining the sum of the rectangles of the font boxes of the characters of the character string;
Font box interference determining means for determining whether the pick window interferes with the font box, and the hit determining means hits when it is determined that the font box interference determining means interferes. The drawing instruction apparatus according to claim 6, wherein it is determined that the image is drawn.
前記ヒット判定手段によってヒットしていると判定された描画要素が重なって表示される場合、それら描画要素を予め指定された量ずつ一時的にオフセットすると共に、オフセットしたことを認識可能に表示するオフセット手段を更に備え、
前記選択手段は、前記オフセット手段によってオフセットされた表示状態において指示された前記入力座標に基づいて、何れかの描画要素を、前記選択された描画要素として決定する
ことを特徴とする請求項1に記載の描画指示装置。
When drawing elements determined to be hit by the hit determination means are displayed in an overlapping manner, the drawing elements are temporarily offset by a predetermined amount, and an offset for recognizing the offset is displayed. Further comprising means,
Said selecting means, based on the input coordinates indicated in the display state that is offset by the offset means, one of drawing elements, in claim 1, wherein the determining as the selected drawing elements The drawing instruction device described.
前記オフセット手段は、
重なっている描画要素の外接矩形を取得する取得手段と、
予め指定された正のマージン値を設定する設定手段と、
指定された前記入力座標を中心に、前記外接矩形が前記マージン値に従って配置できるように、各描画要素の移動量を算出する移動量算出手段と、
算出された移動量に基づいて前記各描画要素を表示した場合、それら描画要素が表示画面内に納まるかを判定し、納まらないと判定した場合は、納まるように表示すべく、前記マージン値をより小さな値に減らして、または表示スケールを縮小させて、前記移動量を再算出する調整手段と、
前記調整手段によって調整された移動量に従って、前記各描画要素を一時的にオフセットする配置手段と、
を含むことを特徴とする請求項8に記載の描画指示装置。
The offset means is
Acquisition means for acquiring circumscribed rectangles of overlapping drawing elements;
A setting means for setting a positive margin value designated in advance;
A movement amount calculation means for calculating a movement amount of each drawing element so that the circumscribed rectangle can be arranged according to the margin value around the designated input coordinates;
When each drawing element is displayed based on the calculated amount of movement, it is determined whether the drawing element fits within the display screen. An adjusting means for recalculating the movement amount by reducing to a smaller value or reducing the display scale;
Arrangement means for temporarily offsetting each drawing element according to the movement amount adjusted by the adjustment means;
The drawing instruction apparatus according to claim 8, comprising:
描画指示装置における描画指示方法であって、
要素取得手段が、描画中の描画要素の中から、選択された可能性のある描画要素を、指示部により指示された入力座標に基づいて取り出す要素取得工程と、
輪郭図形取得手段が、各描画要素の表示イメージにおける輪郭図形を取り出す輪郭図形取得工程と、
ヒット判定手段が、前記入力座標と前記輪郭図形取得工程にて取得した輪郭図形とに基づいて、ヒットしている描画要素を判定するヒット判定工程と、
選択手段が、前記ヒット判定工程にてヒットしていると判定された描画要素を、選択された描画要素の候補として抽出すると共に、抽出された候補の中から何れかの描画要素を、該選択された描画要素として決定する選択工程と、
を有し、
前記ヒット判定工程は、
前記入力座標に基づいて、所定の面積を有するピックウインドウを作成するピックウインドウ作成工程と、
前記ピックウインドウ作成工程によって作成されたピックウインドウと、前記輪郭図形取得工程によって取得した輪郭図形とが干渉しているかを判定する干渉判定工程と、
を含み、
前記ピックウインドウ作成工程は、予め登録された前記ピックウインドウのサイズLを、使用している表示装置の座標系に対応するサイズL’に変換するサイズ補正工程を含む
ことを特徴とする描画指示方法。
A drawing instruction method in a drawing instruction device,
An element acquisition step in which an element acquisition unit extracts a drawing element that may be selected from drawing elements being drawn based on input coordinates instructed by the instruction unit;
A contour graphic acquisition means for extracting a contour graphic in the display image of each drawing element;
A hit determination step in which hit determination means determines a drawing element that is hit based on the input coordinates and the contour graphic acquired in the contour graphic acquisition step;
The selection means extracts the drawing element determined to be hit in the hit determination step as the selected drawing element candidate, and selects any drawing element from the extracted candidates. A selection step for determining as a rendered element;
I have a,
The hit determination step includes
A pick window creating step for creating a pick window having a predetermined area based on the input coordinates;
An interference determination step for determining whether the pick window created by the pick window creation step interferes with the contour graphic acquired by the contour graphic acquisition step;
Including
The pick window creation step includes a size correction step of converting a size L of the pick window registered in advance into a size L ′ corresponding to a coordinate system of a display device being used. Drawing instruction method to do.
請求項1乃至の何れか1項に記載の描画指示装置としてコンピュータを動作させるプログラムを記録したコンピュータ読み取り可能な記憶媒体。A computer-readable storage medium storing a program for operating a computer as the drawing instruction apparatus according to any one of claims 1 to 9 .
JP2000243323A 2000-08-10 2000-08-10 Drawing instruction apparatus, drawing instruction method thereof, and computer-readable storage medium Expired - Fee Related JP4458640B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000243323A JP4458640B2 (en) 2000-08-10 2000-08-10 Drawing instruction apparatus, drawing instruction method thereof, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000243323A JP4458640B2 (en) 2000-08-10 2000-08-10 Drawing instruction apparatus, drawing instruction method thereof, and computer-readable storage medium

Publications (3)

Publication Number Publication Date
JP2002056403A JP2002056403A (en) 2002-02-22
JP2002056403A5 JP2002056403A5 (en) 2007-09-06
JP4458640B2 true JP4458640B2 (en) 2010-04-28

Family

ID=18734196

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000243323A Expired - Fee Related JP4458640B2 (en) 2000-08-10 2000-08-10 Drawing instruction apparatus, drawing instruction method thereof, and computer-readable storage medium

Country Status (1)

Country Link
JP (1) JP4458640B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3938005B2 (en) 2002-10-23 2007-06-27 コニカミノルタビジネステクノロジーズ株式会社 Image processing apparatus and image processing method
JP5387366B2 (en) * 2009-11-26 2014-01-15 ソニー株式会社 Information processing apparatus, information processing method, and program
JP6472171B2 (en) * 2013-08-27 2019-02-20 キヤノン株式会社 Image processing apparatus and method

Also Published As

Publication number Publication date
JP2002056403A (en) 2002-02-22

Similar Documents

Publication Publication Date Title
US7301672B2 (en) Information processing apparatus and information processing method
US6249908B1 (en) System and method for representing graphical font data and for converting the font data to font instructions
JP4329750B2 (en) Print control program
EP2002352B1 (en) Applying effects to a merged text path
JP4458640B2 (en) Drawing instruction apparatus, drawing instruction method thereof, and computer-readable storage medium
US5920324A (en) Character pattern producing apparatus capable of producing character pattern having connected character elements
JPH09114999A (en) Plotting device
JP4124851B2 (en) Information processing apparatus, information processing method, and storage medium
JP4434451B2 (en) Drawing apparatus and drawing method thereof
JP4100779B2 (en) Information processing apparatus and method, and storage medium
JP4174117B2 (en) Information processing apparatus, information processing method, and storage medium
JP3487917B2 (en) Electronic file device
JP4006113B2 (en) Graphic processing method and apparatus
JP4136123B2 (en) Information processing apparatus and method, and storage medium
JP2001005985A (en) Processor for allocating characters
JPH07282074A (en) Index character string output device for two-dimensional graphic
JPH03156668A (en) Document preparing device
WO2007026517A1 (en) Embroidery data generating device and generating method and its program
JP3788466B2 (en) Diagram creation apparatus and diagram creation method
JPH08101675A (en) Font developing device
JPH08287276A (en) Character layout device
JP3082391B2 (en) Image processing device
JPH04184392A (en) Data expression system and plotting system for vector font
JPH09114998A (en) Plotting device
JPH04184393A (en) Plotting system and data expressing system for vector font

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070723

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070723

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20070723

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080819

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090908

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090918

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091116

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100205

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100209

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130219

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140219

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees