Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using layer.style.clip or layer.style.visibility

Status
Not open for further replies.

morgancaroline

Programmer
Jun 27, 2001
12
0
0
GB
I'm using layers and want to clip a certain section of a layer. If I write:
layer.style.clip = 'rect(' + cliptop + ' ' + clipright + ' ' + clipbottom + ' ' + clipleft + ')';

it shows the layer from the point (cliptop,clipright) to (clipbottom,clipleft) but i want some kind of inverted clip command so that instead of showing a layer from one point to another it hides that layer from one pt to another so as to achieve an r-shaped layer as oppose to a square shaped layer.
I thought of using poly instead of rect and defining 7 points but the computer didn't see to like the poly command.
I also thought about using:

layer.style.visibility = "hidden";
but i don't know where the command to define the rectangle that i want hidden should go.

hope you can help
thanx
 
well, clip sets the shape and not the visibility - and visibility or display apply to the whole layer ... how about creating a new layer above the main one and hiding this new layer ? ------
please review FAQ183-874 - this will help you to get the best out of tt
[ "you" is not someone in particular - don't take it too personnal ]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top