Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / java / java / CASCADESamplesJni / V2d_View.java
CommitLineData
7fd59977 1// Java Native Class from Cas.Cade
2// Copyright (C) 1991,1999 by
3//
4// MATRA DATAVISION, FRANCE
5//
6// This software is furnished in accordance with the terms and conditions
7// of the contract and with the inclusion of the above copyright notice.
8// This software or any other copy thereof may not be provided or otherwise
9// be made available to any other person. No title to an ownership of the
10// software is hereby transferred.
11//
12// At the termination of the contract, the software and all copies of this
13// software must be deleted.
14//
15
16
17package CASCADESamplesJni;
18
19import jcas.Object;
20import CASCADESamplesJni.Aspect_WindowDriver;
21import CASCADESamplesJni.V2d_Viewer;
22import jcas.Standard_Real;
23import jcas.Standard_Integer;
24import jcas.Standard_Boolean;
25import jcas.Standard_CString;
26import CASCADESamplesJni.Graphic2d_DisplayList;
27import CASCADESamplesJni.Graphic2d_PickMode;
28import jcas.Standard_Short;
29import CASCADESamplesJni.V2d_TypeOfWindowResizingEffect;
30import CASCADESamplesJni.PlotMgt_PlotterDriver;
31import CASCADESamplesJni.Aspect_TypeOfColorSpace;
32import CASCADESamplesJni.Graphic2d_View;
33import CASCADESamplesJni.Quantity_NameOfColor;
34import CASCADESamplesJni.Aspect_FillMethod;
35
36
37public class V2d_View extends CASCADESamplesJni.Viewer_View {
38
39 static {
40 System.loadLibrary("CASCADESamplesJni");
41 }
42
43public V2d_View(Aspect_WindowDriver aWindowDriver,V2d_Viewer aViewer,double aXCenter,double aYCenter,double aSize) {
44 V2d_View_Create_0(aWindowDriver,aViewer,aXCenter,aYCenter,aSize);
45}
46
47private final native void V2d_View_Create_0(Aspect_WindowDriver aWindowDriver,V2d_Viewer aViewer,double aXCenter,double aYCenter,double aSize);
48
49native public final void SetDefaultPosition(double aXCenter,double aYCenter,double aSize);
50native public final void Fitall();
51native public final void WindowFit(int aX1,int aY1,int aX2,int aY2);
52final public void Fit(double aX1,double aY1,double aX2,double aY2,boolean UseMinimum) {
53 V2d_View_Fit_1(aX1,aY1,aX2,aY2,UseMinimum);
54}
55
56private final native void V2d_View_Fit_1(double aX1,double aY1,double aX2,double aY2,boolean UseMinimum);
57
58native public final void SetFitallRatio(double aRatio);
59final public void Zoom(double Zoom) {
60 V2d_View_Zoom_1(Zoom);
61}
62
63private final native void V2d_View_Zoom_1(double Zoom);
64
65final public void Zoom(int aX1,int aY1,int aX2,int aY2,double aCoefficient) {
66 V2d_View_Zoom_2(aX1,aY1,aX2,aY2,aCoefficient);
67}
68
69private final native void V2d_View_Zoom_2(int aX1,int aY1,int aX2,int aY2,double aCoefficient);
70
71final public void Zoom(int aX,int aY,double aCoefficient) {
72 V2d_View_Zoom_3(aX,aY,aCoefficient);
73}
74
75private final native void V2d_View_Zoom_3(int aX,int aY,double aCoefficient);
76
77native public final void Magnify(V2d_View anOriginView,int X1,int Y1,int X2,int Y2);
78native public final void Translate(double dx,double dy);
79native public final void Place(int x,int y,double aZoomFactor);
80native public final void ScreenPlace(double x,double y,double aZoomFactor);
81native public final void Pan(int dx,int dy);
82final public double Convert(int V) {
83 return V2d_View_Convert_1(V);
84}
85
86private final native double V2d_View_Convert_1(int V);
87
88final public void Convert(int X,int Y,Standard_Real ViewX,Standard_Real ViewY) {
89 V2d_View_Convert_2(X,Y,ViewX,ViewY);
90}
91
92private final native void V2d_View_Convert_2(int X,int Y,Standard_Real ViewX,Standard_Real ViewY);
93
94final public void Convert(double ViewX,double ViewY,Standard_Integer X,Standard_Integer Y) {
95 V2d_View_Convert_3(ViewX,ViewY,X,Y);
96}
97
98private final native void V2d_View_Convert_3(double ViewX,double ViewY,Standard_Integer X,Standard_Integer Y);
99
100final public double Convert(double aDriverSize) {
101 return V2d_View_Convert_4(aDriverSize);
102}
103
104private final native double V2d_View_Convert_4(double aDriverSize);
105
106native public final void Reset();
107native public final void Previous();
108native public final void DisableStorePrevious();
109native public final void EnableStorePrevious();
110native public final void Update();
111native public final void UpdateNew();
112native public final void RestoreArea(int Xc,int Yc,int Width,int Height);
113native public final void Restore();
114final public void Dump() {
115 V2d_View_Dump_1();
116}
117
118private final native void V2d_View_Dump_1();
119
120final public void Dump(Standard_CString aFileName) {
121 V2d_View_Dump_2(aFileName);
122}
123
124private final native void V2d_View_Dump_2(Standard_CString aFileName);
125
126final public Graphic2d_DisplayList Pick(int X,int Y,int aPrecision) {
127 return V2d_View_Pick_1(X,Y,aPrecision);
128}
129
130private final native Graphic2d_DisplayList V2d_View_Pick_1(int X,int Y,int aPrecision);
131
132final public Graphic2d_DisplayList Pick(int Xmin,int Ymin,int Xmax,int Ymax,short aPickMode) {
133 return V2d_View_Pick_2(Xmin,Ymin,Xmax,Ymax,aPickMode);
134}
135
136private final native Graphic2d_DisplayList V2d_View_Pick_2(int Xmin,int Ymin,int Xmax,int Ymax,short aPickMode);
137
138native public final void Erase();
139native public final void MustBeResized(short anEffect);
140native public final void HasBeenMoved();
141final public void Plot(PlotMgt_PlotterDriver aPlotterDriver,double aXCenter,double aYCenter,double aScale) {
142 V2d_View_Plot_1(aPlotterDriver,aXCenter,aYCenter,aScale);
143}
144
145private final native void V2d_View_Plot_1(PlotMgt_PlotterDriver aPlotterDriver,double aXCenter,double aYCenter,double aScale);
146
147final public void Plot(PlotMgt_PlotterDriver aPlotterDriver,double aScale) {
148 V2d_View_Plot_2(aPlotterDriver,aScale);
149}
150
151private final native void V2d_View_Plot_2(PlotMgt_PlotterDriver aPlotterDriver,double aScale);
152
153native public final void PlotScreen(PlotMgt_PlotterDriver aPlotterDriver);
154native public final void ScreenCopy(PlotMgt_PlotterDriver aPlotterDriver,boolean fWhiteBackground,double aScale);
155native public final void PostScriptOutput(Standard_CString aFile,double aWidth,double aHeight,double aXCenter,double aYCenter,double aScale,short aTypeOfColorSpace);
156native public final void ScreenPostScriptOutput(Standard_CString aFile,double aWidth,double aHeight,short aTypeOfColorSpace);
157native public final void Hit(int X,int Y,Standard_Real gx,Standard_Real gy);
158native public final void ShowHit(int X,int Y);
159native public final void EraseHit();
160native public final void SetDefaultHighlightColor(int aColorIndex);
161native public final void SetDeflection(double aDeflection);
162native public final double Deflection();
163native public final Graphic2d_View View();
164native public final V2d_Viewer Viewer();
165native public final Aspect_WindowDriver Driver();
166final public double Zoom() {
167 return V2d_View_Zoom_4();
168}
169
170private final native double V2d_View_Zoom_4();
171
172native public final void Center(Standard_Real aX,Standard_Real aY);
173native public final double Size();
174native public final short Color();
175native public final void Scroll(Standard_Integer XCenter,Standard_Integer YCenter,Standard_Integer DX,Standard_Integer DY);
176native public final int DefaultHighlightColor();
177final public void Fit(int aX1,int aY1,int aX2,int aY2) {
178 V2d_View_Fit_2(aX1,aY1,aX2,aY2);
179}
180
181private final native void V2d_View_Fit_2(int aX1,int aY1,int aX2,int aY2);
182
183final public void SetBackground(short aNameColor) {
184 V2d_View_SetBackground_1(aNameColor);
185}
186
187private final native void V2d_View_SetBackground_1(short aNameColor);
188
189final public boolean SetBackground(Standard_CString aNameFile,short aMethod) {
190 return V2d_View_SetBackground_2(aNameFile,aMethod);
191}
192
193private final native boolean V2d_View_SetBackground_2(Standard_CString aNameFile,short aMethod);
194
195public V2d_View() {
196}
197
198
199
200
201}