No background in painted rect

MisterX b.xavier at internet.lu
Thu Dec 1 14:14:05 EST 2005


Richard,

To look for things in the revdocs, think of what object you are modifying.

if you know the name of the property you are looking for search the
"Reference" - that's the icon on top of the revdocs. Search graphics, you'll
find soon the right property too via the "see also". That's how I navigate
and find stuff...

If it is an object (like a graphic object), click the big object icon on top
of revdocs, select "object" in the list, then below objects is "graphic" -
look at the properties, you will find below it the "Points"... It's always
handy to read them all at some point to get aquainted with each object's
features. More power for future ideas!

Meanwhile in the jungle what you need is this:
in a button next to a graphic control you just created

get datapoint - a list of points (see revdocs for delitimiter)
set the points of graphic 1 to it

and whop (magic trick drum roll) you got a graphic with 7000 points!

This trick doesn't work for bar charts though. Pie charts, either... 

unless you try the EXCELLENT chart making stack from a fellow economist Ken
Simons at

http://www.rpi.edu/~simonk/technical.html

I think http://flexibleLearning.com has one too - H/?

and yours truly did the pie charts on monsieurx.com

http://www.monsieurx.com/modules.php?name=News&file=article&sid=162

Speed tips:
Separate number crunching from painting. You may not see a big difference
for smaller charts but for medium to big charts you will. 

Interpolating 7000 points on a smaller resolution graphics (say 500) will 
also get you a speed boost... A running average median function curve can do
that easily to smooth out the curve.

I'll start working on the statistics stack some time soon. I do have more
examples at http://monsieurx.com/rev in the simple examples somewhere

http://www.monsieurx.com/modules.php?name=Downloads&d_op=viewdownloaddetails
&lid=84&ttitle=SimpleStats

there it is...

cheers
Xavier
http://www.monsieurx.com/taoo



> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> R. Hillen
> Sent: Thursday, 01 December, 2005 18:44
> To: use-revolution at lists.runrev.com
> Subject: No background in painted rect
> 
> Hello Xavier, hello Ken,
> 
> thank you for your help.
> 
> > Message: 3
> > Date: Thu, 1 Dec 2005 10:55:30 +0100
> > From: xavier.bury at clearstream.com
> > Subject: Re: No background in painted rect
> >
> > Hi Richard
> >
> > you need to set the opaque of the polygon to true...
> >
> > To find more about paint, there's always the rev documentation...  
> > Using
> > the search instead of the
> > filter should help find more... Alas painting in Rev is not that 
> > good...
> > It's far easier and better to
> > import ready made art into the "image" controls...
> >
> >
> 
> I looked everywhere in the documentation, but it was not very 
> helpfull. I know, all is written there, but to find it and 
> how it is connected together, is another thing. But I found a 
> little stack and learned from it, that I had to "set the 
> filled to true" and to do that _before_ choosing the paint 
> tool. (Yesterday, trying graphic pbjects, I learned from this 
> list to set the opaque to true.)
> 
> I want to show soundlevels in an area,  200 times 200 
> datapoints as litte scaled coloured rects, so I have to paint 
> it. I also tried to use graphic objects. While the painting 
> of the 40000 datapoints take about 8 Minutes, using graphic 
> objects takes about twice as long. The main time is used by 
> dragging the rects or painting the rectangles.
> 
> And both is a very long time to show some data.
> 
> Richard.
> 
> 
> 
> > Message: 13
> > Date: Thu, 01 Dec 2005 09:12:17 -0600
> > From: Ken Ray <kray at sonsothunder.com>
> > Subject: Re: No background in painted rect
> >
> >> Hello list,
> >>
> >> now I wanted to paint a rect filled with Color.
> >
> > As Xavier mentioned, you need to set the opaque to true, but I'm 
> > curious - is there a reason you need a *painted* rect? It 
> would be a 
> > lot easier to use the graphic objects in Rev:
> >
> >   put "200,50,100" into RGB_Color
> >   create graphic  -- defaults to a rectangle
> >   put it into tGrcDesc
> >   set the opaque of tGrcDesc to true
> >   set the backgroundColor of tGrcDesc to RGB_Color
> >   set the borderColor of tGrcDesc to RGB_Color
> >   choose browse tool
> >
> > HTH,
> >
> > Ken Ray
> > Sons of Thunder Software
> > Web site: http://www.sonsothunder.com/
> > Email: kray at sonsothunder.com
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list