Visio Guy

Visio Discussions => General Visio => Topic started by: david on November 18, 2008, 11:14:23 PM

Title: How to Clip or Mask a Circular Region on a Visio Page?
Post by: david on November 18, 2008, 11:14:23 PM
hi everybody,
i need to do something in visio that sounds pretty hard but maybe there's a simple solution to do that.
this is what i need to do:
i have a frame with many drawings.  i need to mask the frame with a circle so that i will always see the drawings only inside the circle.  outside the circle the frame should always be black no matter where the circle is.  in other words, i can see the drawings of the frame only through the circle.  and if i want to see what is drawn on the upper left corner of the frame i should move the circle to that corner.

i didn't find a way to do that.  anyone has an idea?  any kind of idea will be helpful.  i can write code if neccesary.

thanks in advance
David
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: Paul Herber on November 18, 2008, 11:30:36 PM
like this?
Title: Re: hope anyone knows that
Post by: david on November 19, 2008, 08:02:42 AM
it's perfect!! just what i needed.

thank you very much!
David
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: Paul Herber on November 19, 2008, 08:14:43 AM
Wapperdude has another solution that he'll be posting when his part of the world wakes up.


Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: david on November 19, 2008, 08:31:31 AM
excellent!

is there a possibility to allow the user changing the size of the external square? i don't see such a possibility in your example.  you can drag and change sizes only of the circle inside the square (which i btw changed to a little square).  i'd like to allow it also to the square (meaning that the square will not necessarily hide the whole frame).

thanks
David
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: Paul Herber on November 19, 2008, 08:38:45 AM
Yes, my shape was very quick and dirty to get something before it got too late here.
Open the shapesheet for the shape (menu Window -> Show Shapesheet) and edit the geometry2 section, it's just a square +/- 1000mm, edit as you see fit. Maybe someone has time to make the shape more general.

Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: david on November 19, 2008, 09:41:09 AM
that's not what i meant.
i know i can manually change the numbers in geometry2 to whatever i want.  i want to allow the USER to change the sizes of the outside square with the mouse.  just like he can change the sizes of the inside circle with the mouse.
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: Visio Guy on November 19, 2008, 11:30:20 AM
This tackles the problem from the other side, so to speak:

Masking Images in Visio (http://www.visguy.com/2007/07/29/masking-images-in-visio/)
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: wapperdude on November 19, 2008, 03:30:44 PM
Have a look at this -- changes size, selects between square and circle...
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: wapperdude on November 19, 2008, 03:40:09 PM
Ah!  I should have placed this on a separate stencil...that way it's available for drag and drop...re-post for convenience...
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: wapperdude on November 20, 2008, 04:03:50 PM
Can't leave it alone .. better circle, variable aspect ratio  :o ;D
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: david on November 20, 2008, 06:18:48 PM
thank you very much to everybody.  i used your examples in my work and as to the external square i added properties for the user so he can change the sizes of that square through the properties.  he can't do it with the mouse but still it works fine.

this forum is great! very very helpful.
thank you
David
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: wapperdude on November 20, 2008, 08:52:34 PM
Who's in charge of quality control around here?  The more features you add to something, the more that can go wrong, and the more test cases that should be run.  Sign.   :P  Found a bug with the MagicWindow if you go to landscape, circle.  Looks kinda funny actually.  Well, hopefully this fixes the problem...   :( 

Sorry, just feel compelled to get it right.  I'll stop with this entry though. 
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: david on November 21, 2008, 09:51:56 AM
thanks man :).
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: wapperdude on November 22, 2008, 04:45:05 PM
OK.  I lied.  But it's Paul Herber's fault.  He made a couple of suggestions and provided some enthusiastic encouragement, so, here's an updated version that includes metric -- for those of you not lucky enough to live at the center of the universe, aka, California.   ;D
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: Visio Guy on November 28, 2008, 03:45:09 PM
You can see my take on this problem at:

Super Mask Visio Clipping Shape  (http://www.visguy.com/2008/11/28/super-mask-visio-clipping-shape/)

The shape has the following features:

Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: david on December 02, 2008, 11:11:31 AM
wow thanks!
you wrote the article because of me?

makes me proud :)
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: jp on January 08, 2010, 05:52:56 PM
This is great! I was wondering, how can I use this in the opposite way? i.e. How can I make what is inside the hole 'masked over' and the rest of the page is 'bright'?
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: Visio Guy on January 08, 2010, 06:42:10 PM
You're thinking too hard, jp! :)

Just draw a circle or rectangle or square, then go to Format > Fill and give it some transparency!
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: jp on January 08, 2010, 06:51:40 PM
Thanks.  I did that actually, but after playing with different transparency levels, I converted the files to pdf (as I will have to do eventually), and I still can't get the portion beneath the shaded area to show through.

When I downloaded your file and converted it to pdf, everything shows through beautifully!!
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: Visio Guy on January 08, 2010, 07:27:58 PM
Ah! Now I understand.

I think that the super mask just uses normal transparency, though. Not sure why it would be any different.

Unfortunately, Visio transparency, especially with gradient fills can turn out less than desirable in pdfs and print-outs. When I get garbage, I export to a high-res bitmap and print that instead. Files can be large, so I usually export, print, then delete the bmp to keep the ol' hard drive clean.
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: wapperdude on January 08, 2010, 07:51:58 PM
Yep, pdf and gradient fills are a real bugger.  But, usually solid fills are OK, even with transparency.  See attached.  This was done with Visio 2007 Std, shapes from Visio Tech 4.1 (someone is too cheap to buy 2007Pro & already has the older version).  I used the Publish as PDF... add-on, all settings were default.

Wapperdude
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: wapperdude on January 08, 2010, 08:12:32 PM
OK.  Slow day at the office. 

Here's an embellishment, NOT using Visio Guy's mask, but, uh hmmm, someone else's "Magic Window", see Re: How to Clip or Mask a Circular Region on a Visio Page? (http://visguy.com/vgforum/index.php?topic=494.0).   :o  :-X

Some people have no shame!
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: Visio Guy on January 09, 2010, 12:30:14 AM
What? No Threads?!?
Title: Re: How to Clip or Mask a Circular Region on a Visio Page?
Post by: wapperdude on January 09, 2010, 12:39:34 AM
;D