Sitemap

Amicuk Programming Answers

Use a compound path as clipping mask?

-0001-11-30   Views:0

Advertisement

Hello, I'm trying to use a complex compound path as a clipping mask, but it won't work. I have narrowed down the problem a little in two smaller scripts described below. Using a single path as clipping mask works very well: var doc = app.documents.ad

Hello,
I’m trying to use a complex compound path as a clipping mask, but it won’t work. I have narrowed down the problem a little in two smaller scripts described below.
Using a single path as clipping mask works very well:
var doc = app.documents.add();
var clipGroup = doc.groupItems.add();
var bgItem = clipGroup.pathItems.rectangle(200, 200, 200, 200);
bgItem.position = Array(200, 500);
bgItem.fillColor = doc.swatches[8].color;
var fgItem = clipGroup.pathItems.polygon(144, 288, 72.0, 7);
fgItem.position = Array(220, 480);
fgItem.fillColor = doc.swatches[7].color;
fgItem.zOrder(ZOrderMethod.BRINGTOFRONT);
clipGroup.clipped = true;
alert(clipGroup.clipped); // will alert true
But when trying the simplest form of a compound path, it’s not working:
var doc = app.documents.add();
var clipGroup = doc.groupItems.add();
var bgItem = clipGroup.pathItems.rectangle(200, 200, 200, 200);
bgItem.position = Array(200, 500);
bgItem.fillColor = doc.swatches[8].color;
var compoundItem = clipGroup.compoundPathItems.add();
var fgItem = compoundItem.pathItems.polygon(144, 288, 72.0, 7);
fgItem.position = Array(220, 480);
fgItem.fillColor = doc.swatches[7].color;
compoundItem.zOrder(ZOrderMethod.BRINGTOFRONT);
clipGroup.clipped = true;
alert(clipGroup.clipped); // will alert false
Using compound paths as clipping masks is really simple in the Illustrator GUI. So what am I missing here?
Help would be greatly appreciated.

The replay answer
Advertisement
The simplest way, I think, would be to set the white line work as an opacity mask on top of the tan circle. That is not a clipping mask, but does the same thing and it's much easier.
Otherwise, outline white strokes and "Unite" using pathfinder tool, then delete outside path (the circle), from the compound shape. That will leave the appropriate compound object to make the clipping mask:

Go to See the other 5 answers

Use a compound path as clipping mask?

Category:DefaultRelease time:-0001-11-30Views:130

Hello, I'm trying to use a complex compound path as a clipping mask, but it won't work. I have narrowed down the problem a little in two smaller scripts described below. Using a single path as clipping mask works very well: var doc = app.documents.ad[More]

Calling all compound path and clipping mask experts...

Category:DefaultRelease time:-0001-11-30Views:130

I am attempting to get all the white areas in the attached "globe" artwork to knockout to the background color. I have tried making the entire thing a compound path, tried clipping mask and different combinations in pathfinder with no success. T[More]

Why are all paths in Clipping Masks and Compound Paths?

Category:DefaultRelease time:-0001-11-30Views:130

When I open up previous versions of Illustrator files (i.e. CS5), why are all of my paths messed up. Every object is embedded in a Clipping Mask, paths are compounded and in most cases type on a path is expanded into multiple non-editable objects. Th[More]

Compound path vs. clipping path

Category:DefaultRelease time:-0001-11-30Views:130

How do these differ?Totally different features. A compound path is basically an object with a "hole" or "holes" in it. (Like an O or an 8) A clipping path (which can also be a compound) is a mask. Parts of objects that lie outside the[More]

Draw inside disabled, and clipping mask workaround loses information

Category:DefaultRelease time:-0001-11-30Views:130

I want to use my compound paths, with styles, fills and strokes applied to "draw inside", but that command is greyed out when I select them. However, if I "cheat" and instead use the compound paths as clipping masks first, I accomplish[More]

Clipping mask is clipping my lines and not the actual object.

Category:DefaultRelease time:-0001-11-30Views:130

Hi all,I'm using the latest CC Illustrator. I'm so frustrated and hope someone can help me, I've already spent a few hours trying to figure this out and looked through a number of tutorials and troubleshoot forums and I cant find an answer. How do I[More]

White gaps in black stroke of clipping mask path

Category:DefaultRelease time:2015-10-11Views:130

Drew a path in Illustrator - made it a compound path.  Made a clipping mask with another object inside it.  When saved as a pdf, there are these strange white gaps in the stroke of the path.....file://localhost/Users/wardmorgan/Desktop/Screen%20shot%[More]

Making a clipping group with a compound path

Category:DefaultRelease time:-0001-11-30Views:130

So, as of today I'm new to scripting for Illustrator, I'm using the ExtendScript Toolkit. However I'm not new to scripting my own solutions and I do have some experience with JavaScript already. What I'm trying to do is this: For all selected Items->[More]

Help with creating compound/Clipping Mask

Category:DefaultRelease time:-0001-11-30Views:130

Hello, This is going to be quite hard to explain so bear with me! I recently live traced a hand drawn pattern into illustrator pressing 'Ignore white', Underneath this I have a jpg with a texture I want to use. My aim is to cut out the shape of two l[More]

I need to create a clipping mask that covers the negative space of my created path...

Category:DefaultRelease time:-0001-11-30Views:130

Like in a Circle I need to make the compound path the inner area or negative space of my objects. I have expanded letters and joined their paths so that there are negative space, I was wondering if it were possible to fill in the negative space with[More]

URGH! Make clipping mask/path out of a placed image?!

Category:DefaultRelease time:-0001-11-30Views:130

I'm having major issues. I'm a n00b at Illustrator, though. I need to make a placed photo into a clipping path, and I can't figure out how to do it correctly. It's homework for a college course in Digital Illustration. I need to recreate a photo usin[More]

Hot
Hi gurus. Our CLM Vendor and Material imports tasks have been working fine until recently when we experienced the error: Data Import Service: File: Material20150401-101647-817.xml is corrupt and cannot be imported We have not done changes to either C [More]
We are using Oracle 10.2.0.4.0 on Linux platform. This is a development database. After replacing the disk for database, my manager has asked me to find if the new disk is performing slow or fast. Can i gauge disk performance from AWR report by compa [More]
I want Change format mask for all fields that type's number Such as if  :parameter_value = 1 then    all fields format mask = ' 999,999,990.000' ; else    all fields format mask = ' 999,999,990.00' ; end if; RegardsSo, i have bad news for you : you'l [More]
Hi SDN, there is a TXT file with over a million records in AL11 (application server). when we try to open/download the file it's giving short dump related to memory. how to view the contents in this file. Pls suggest. Thanks, Suman.Hello, As mentione [More]
I have been using final cut express to make my videos. When I export them, I export them over to quicktime. To upload them to vimeo, they need to be below 500MB. I have always just uploaded them to Itunes which makes them smaller. I have done this fo [More]
Hi guys can you tell me whats External procurement profile? Does this profile does not allow to transfer PR to SRM using CPPR esoa. I got below error when i click Transfer to central system button in CPPR screen. PR xxxxx item xxxx has External procu [More]
Dear All, Can anybody suggest me if there can be a tcode to block or inactivate a pricing condition. Rgds, IndrajitHi Indrajit There is no t.code to block the pricing conditon. Assuming it is a item conditon type and maintained a condition record als [More]
The problem I'm facing is that Oracle tools fail to assemble web services because my model classes inherit from an abstract class and the assembler does not seem to recognize this: build.xml:90: oracle.j2ee.ws.common.tools.api.ValidationException: co [More]
I would like to use apt task in jdeveloper. How to include this task in jdev 10.1.3.4 ?Frederic, JDev 10.1.3.4 has built-in support for working with ANT. The included version is 1.6.5. You can use the "New!" menu option to create a new build.xml [More]
Hi, I am really struggling to stay sane with iTunes. iTunes keeps re-downloading purchased songs so it is continuously duplicating songs. Has anyone any idea how I stop it??? Thanks in advance for any help. Louise x# Download the installer for the la [More]