MCPcopy Create free account
hub / github.com/Kitware/VTK / Java_vtk_vtkPanel_RenderCreate

Function Java_vtk_vtkPanel_RenderCreate

Utilities/Java/vtkJavaAwt.h:41–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40VTK_ABI_NAMESPACE_BEGIN
41extern "C" JNIEXPORT jint JNICALL Java_vtk_vtkPanel_RenderCreate(
42 JNIEnv* env, jobject canvas, jobject id0)
43{
44#if defined(WIN32_JAWT_LOCK_HACK)
45 int hash;
46 WJLH_HASH_FUNC(env, canvas, hash);
47 WJLH_lock_map[hash] = 0;
48#endif
49
50 JAWT awt;
51 JAWT_DrawingSurface* ds;
52 JAWT_DrawingSurfaceInfo* dsi;
53 jint lock;
54
55 // get the render window pointer
56 vtkRenderWindow* temp0;
57 temp0 = (vtkRenderWindow*)(vtkJavaGetPointerFromObject(env, id0));
58
59 // Avoid non-used var warnings
60 (void)temp0;
61
62 /* Get the AWT */
63 awt.version = JAWT_VERSION_1_3;
64 if (JAWT_GetAWT(env, &awt) == JNI_FALSE)
65 {
66#ifndef VTK_JAVA_DEBUG
67 printf("AWT Not found\n");
68#endif
69 return 1;
70 }
71
72 /* Get the drawing surface */
73 ds = awt.GetDrawingSurface(env, canvas);
74 if (ds == NULL)
75 {
76#ifndef VTK_JAVA_DEBUG
77 printf("NULL drawing surface\n");
78#endif
79 return 1;
80 }
81
82 /* Lock the drawing surface */
83 lock = ds->Lock(ds);
84 if ((lock & JAWT_LOCK_ERROR) != 0)
85 {
86#ifndef VTK_JAVA_DEBUG
87 printf("Error locking surface\n");
88#endif
89 awt.FreeDrawingSurface(ds);
90 return 1;
91 }
92
93 /* Get the drawing surface info */
94 dsi = ds->GetDrawingSurfaceInfo(ds);
95 if (dsi == NULL)
96 {
97 printf("Error getting surface info\n");
98 ds->Unlock(ds);

Callers

nothing calls this directly

Calls 8

printfFunction · 0.85
UnlockMethod · 0.80
LockMethod · 0.45
FinalizeMethod · 0.45
SetWindowIdMethod · 0.45
SetDisplayIdMethod · 0.45
SetParentIdMethod · 0.45

Tested by

no test coverage detected