comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » simple IDLgrImage 4xNxM problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
simple IDLgrImage 4xNxM problem [message #65823] Thu, 26 March 2009 11:40
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi folks,

I'm Trying to draw a simple semi-transparent red square. I use the
BLEND_FUNCTION property and I set the data in the IDlgrImage as a
4xNxN matrix (red-green-blue-alpha values).

Why the following code doesn't works ?
------------------------------------------------------------ --------------------
base=WIDGET_BASE(/COLUMN, /FRAME)
wDraw=WIDGET_DRAW(base, XSIZE=500, YSIZE=500, GRAPHICS_LEVEL=2)
WIDGET_CONTROL, base, XOFFSET=100, YOFFSET=100, /REALIZE
WIDGET_CONTROL, wDraw, GET_VALUE=wid
wid->SetProperty, QUALITY=2
oWindow=wid
viewplane_rect=[0., 0., 500., 500.]
oView = OBJ_NEW('IDLgrView', VIEWPLANE_RECT = viewplane_rect, COLOR=
[255,255,255])
oModel = OBJ_NEW('IDLgrModel')
oView->Add, oModel

image=OBJ_NEW('IDLgrImage')
oModel->Add, image

data=FLTARR(125,125)
data[0,*,*]=255
data[3,*,*]=0.5

image->SetProperty, DATA=data, BLEND_FUNCTION=[3,4], $
LOCATION=[50,50], DIMENSIONS=[125,125]

oWindow->Draw, oView
------------------------------------------------------------ --------------------

It should works but there is no result.
Can anybody help me ??

Help me,
llo
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Installation on Linux Systems
Next Topic: Re: simple IDLgrImage 4xNxM problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:06:17 PDT 2025

Total time taken to generate the page: 1.44178 seconds