Skip to content

Commit

Permalink
fix #1732
Browse files Browse the repository at this point in the history
  • Loading branch information
doutriaux1 committed Dec 10, 2015
1 parent 8087cd0 commit c21f8bf
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Packages/vcs/Lib/vcs2vtk.py
Expand Up @@ -1199,7 +1199,7 @@ def prepFillarea(renWin, farea, cmap=None):
if opacity is not None:
opacity = farea.opacity[i]
else:
opacity = 100
opacity = None
# Draw colored background for solid
# transparent/white background for hatches/patterns
if st == 'solid':
Expand Down
5 changes: 5 additions & 0 deletions testing/vcs/CMakeLists.txt
Expand Up @@ -11,6 +11,11 @@ cdat_add_test(vcs_verify_import
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_import.py
)
cdat_add_test(vcs_fillarea_transparency
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_fillarea_transparency.py
"${BASELINE_DIR}/test_vcs_fillarea_transparency.png"
)
cdat_add_test(vcs_test_bad_png_path
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_bad_png_path.py
Expand Down
36 changes: 36 additions & 0 deletions testing/vcs/test_vcs_fillarea_transparency.py
@@ -0,0 +1,36 @@
import vcs
import sys,os
pth = os.path.join(os.path.dirname(__file__),"..")
sys.path.append(pth)
import checkimage

x=vcs.init()
x.setantialiasing(0)
x.drawlogooff()
x.setbgoutputdimensions(1200,1090,units="pixels")

fa1 = x.createfillarea()

fa1.x=[.2,.8,.8,.2]
fa1.y = [.2,.2,.8,.8]
fa1.color = 242

fa2=x.createfillarea(source = fa1)

fa2.x = [.1,.9,.9,.1]
fa2.y = [.1,.1,.9,.9]

cmap = x.createcolormap()
cmap.setcolorcell(242,0,0,100,50)

fa2.colormap = cmap

x.plot(fa1)
x.plot(fa2)

fnm = os.path.split(__file__[:-2]+"png")[-1]
x.png(fnm)
src = sys.argv[1]

ret = checkimage.check_result_image(fnm,src,checkimage.defaultThreshold)
sys.exit(ret)

0 comments on commit c21f8bf

Please sign in to comment.