Change the color of compoundPathItems created by converting text to paths using createOutline()

I used createOutline() to convert the text to paths. However, the return is a GroupItem and I struggled to change its stroke and fill colors.

Here is my script:

var docActive = app.documents.add ();

textFrame var = docActive.pathItems.rectangle (0, 0, 200, 20);

var areaText = docActive.textFrames.areaText (textFrame);

areaText.contents = "Hello My Friend";

areaText.textRange.characterAttributes.size = Math.round(20*0.85);

var textOutline = areaText.createOutline ();

Try to change the stroke and fill of textOutline colors but I got stuck here...

Try this, I added comments next to each line

var docActive = app.documents.add();
var textFrame = docActive.pathItems.rectangle( 0, 0, 200, 20);
var areaText = docActive.textFrames.areaText(textFrame);
areaText.contents = "Hello My Friend";
areaText.textRange.characterAttributes.size = Math.round(20*0.85);

var textOutline = areaText.createOutline(); // this is a group

var compoundPaths = textOutline.compoundPathItems; // each letter is a compound path
for (i=0; i 
         

Tags: Illustrator

Similar Questions

  • Change the color of already created Flash Video

    Hello

    I work with either a swf, fla or f4v file file that has already been created and I need to change the hue of the product in the video. How can I do this?

    You have any video editing software like After Effects, first or any free solution out there (VirtualDub, etc.)? You can change the F4V.

    The general rule in the video industry is "garbage in, garbage out." If you work on the f4v Tablet and the need to recompress it again, you will degrade the quality of the video even more. If the initial compression was the light, then it may be not a problem.

    The best solution would be to convert the SWF file in a video with free SWF to video converter tools while specifying a container/uncompressed codec (uncompressed AVI, MOV with 'None' selected compression, MOV with Animation codec as max, etc.). Then import this video editing and then export to F4V again.

    If you are not familiar with video editing techniques and software, you can also import the SWF in a new Flash document (which will allow to import as a series of keyframes). Then, create a mask layer above the video and draw a shape around the product, so mask separates well just the video. Add a layer of setting higher than that and use it to hopefully the color is enough to pass. Then use the file-> export-> Export movie.

    If the video is very short (not), I would be willing to help with my software. PM me if the video is short with a link to the SWF and F4V using a (google it) service free/quick fileshare as Dropbox.

  • How to change the color of a scanned document converted to PDF

    HII...

    I have a scanned pdf document. How can I change the background color of these documents?

    Hi manasap1234 ,

    Please visit this link which deals with the same subject: change background in scanned document (analysis and optimization)

    Let us know if you face any problem.

    Thank you

    Shivam

  • Programmatically change the color of a subset of a text caption

    Is this possible? My code attached does not work.

    Thank you

    Ian

    I know I should use 'FontColor' instead of 'TextColor '. It works now.

  • Change the color of a specific character in a text.

    Hi guys! for a project I need to change the color of each "a" in a text. Is there a way I can do it automatically?

    Aaaah! Try using a simple grep style!

    If you need to play in all the paragraph styles, map of style grep using this very clever script written by Colin Flashman, King of merge data!

    https://DL.dropboxusercontent.com/u/55743036/grepstylemap.jsx

    or a simple F/R.

  • How to change the color picker?

    It's the only thing that I hate to Abobe Flash CC, the new color picker, I can change it somehow?

    Please specify the denial.

    Unfortunately, there is no easy way to change the color picker, but if you think it will be useful, the request through the wish form: feature request/Bug Report Form.

    -Mabrouk

  • How to change the color of the div tag with source code?

    I know that there should be a way to change the colors of only some text as boxes this. It should be as simple as a code of color at the beginning and at the end of the tag like

    <div><color="#FF0000">This text should be RED</color></div>
    

    I tried and it came with the error "Invalid markup, this is not the right format of an HTML tag."

    I'm about 99% certain you can change the colors of the specific divs using color codes without giving them an Id and make a rule css for them, I don't know how. It is a simple question, and it should be a simple answer.

    Greatestdan wrote:

    I know that there should be a way to change the colors of only some areas of text like that. It should be as simple as putting a color at the beginning and at the end of the tag as a code

    This text should be RED

    I tried and it came with the error "Invalid markup, this is not the right format of an HTML tag."

    I'm about 99% certain you can change the colors of the specific divs using color codes without giving them an Id and make a rule css for them, I don't know how. It is a simple question, and it should be a simple answer.

    FIX:

    This text should be RED

  • Hello, a graphic designer created my logo. I need to change the color from black to white and then make it bigger so I can add it to a T-shirt. I looked online and can't find a way to do it. Please help :)

    Hello, a graphic designer created my logo. I need to change the color from black to white and then make it bigger so I can add it to a T-shirt. I looked online and can't find a way to do it. Help, please

    Guess that's your logo. His place of 1000px

    Select each layer, and then type cmd - I or ctrl-I on the keyboard and that will reverse the color of the objects on the layer. Black is the

    opposite of white

    And then resizing the image size under Select image menu and place values expanded in the dialog box

    as below.

    That's all. It may be useful

    Terri

  • Hello, I want to make an outline of the text that I created.  I started with a blue background.  Then, I created a text and changed the color of gold.  I then put on an image and used the clipping mask to show the image by the text. Problem

    Hello, I want to make an outline of the text that I created.  I started with a blue background.  Then, I created a text and changed the color of gold.  I then put on an image and used the clipping mask to show the image by the text. Problem is it gets rid of color and shows that the peak through the text.  I wanted a draft of the text with the picture.  Is this possible?

    Thank you

    Peter

    You're welcome, Peter.

  • How I changed the color of something? OK, so I use to be able to change the color of things, but now I have use color overlay, gradient overlay, or change the color when I first create the form, it turns into another shade of gray instead of chan

    How I changed the color of something? OK, so I use to be able to change the color of things, but now I have use color overlay, gradient overlay, or change the color when I first create the form, it turns into another shade of gray instead of change the color, I chose.

    Three things I can think of:

    Your document must be in RGB mode.

    Layer blending mode should be set to Normal

    Masks are grayscale. If you select the mask, you cannot apply a color.

    Always check your tab at the top to see if what you choose is RGB or grayscale.

    Gene

  • Change the color of the image

    Hello

    I have an image that I copied from a PDF file. The image is green. I want to make it black. It isn't vectorised and transparency. I tried to add a fill color, without success.

    Someone knows how can I do this? I know that Photoshop is as simple as adding a color overlay in the Merge Options.

    Thank you

    Assuming that the image is indeed a bitmap and you do not want to redefine your image in Photoshop or another bitmap editing program, need us more details to know exactly what the image is and that some parts of the image that you want to color 'black' instead of 'green '. You're talking about coloring the dark green parts, or you want to give the whole picture a black tint? You want to remove the color entirely?

    If you just want to give the whole image a black shade, create a black rectangle in Illustrator, paste it on the image, and set the option "Color" of transparency. Then, use the opacity percentage to vary the amount of black. (This will also color the background, however.) You can then use the Eraser tool (for example) in Illustrator to remove parts of the shape of recovery in order to expose his background or the original image.

    In addition, if you want to remove the color of a bitmap entirely in artificial intelligence, you can select convert it change - change the colors - the menu in grayscale command.

    I don't know why you would oppose the image editing in Photoshop and then import into Illustrator, considering it as a bitmap image in a first time.

  • Change the color of an individual cell after editing in a datagrid control

    Hi all, I have tried with the custom converter but its either change the entire grid or the entire column. Is it possible to solve this problem by applying the element converter to a particular area? Help needed please...


    Thanks in advance

    I did a bit of work on this and discovered some things that make it a little hard.

    Let's start with the application and the DataGrid control. You will need to know whether or not the currently edited cell value has changed. To do this, I created a variable called oldValue. I then added two event handlers for the DataGrid control:

    itemEditBeginning = "rememberValue (event)" "
    itemEditEnd = "markCell (event)" "

    In the rememberValue function, I copied the value in the cell for the oldValue:

    private function rememberValue (event: DataGridEvent): void
    {
    oldValue = dp [event.rowIndex] [event.dataField];
    }

    In markCell, I have determined if the value has changed. If so, I placed his index of row/column on a list or I removed it from the list:

    private function markCell (event: DataGridEvent): void
    {
    If (event.reason == DataGridEventReason.CANCELLED) {}
    return;
    }

    var newValue:String =
    TextInput (event.currentTarget.itemEditorInstance) .text;

    If (oldValue! = Number (newValue)) {}
    HilightEditedCellRenderer.addCell (event.rowIndex, event.columnIndex);
    } else {}
    HilightEditedCellRenderer.removeCell (event.rowIndex, event.columnIndex);
    }
    }

    HilightEditedCellRenderer is the itemRenderer to my cells. AddCell and removeCell functions are static members of the cell.

    In the HilightEditedCellRenderer, I created an ArrayCollection collection to contain the list of cells and the following functions:

    public static var editedCells:ArrayCollection = new ArrayCollection();

    isEditedCell determines if the row/column is in the collection editedCells.

    public static void isEditedCell (rowIndex:Number, columnIndex:Number): int
    {
    for (var j: int = 0; j< editedcells.length;="">
    {
    If (rowIndex == editedCells [j] .rowIndex & columnIndex == .columnIndex editedCells [j])
    {
    return j;
    }
    }

    Returns - 1;
    }

    removeCell deletes the row/column index within the collection of editedCells pair
    public static void removeCell (rowIndex:Number, columnIndex:Number): void
    {
    determine whether the cell is already on the list and if so, remove it
    var int index = isEditedCell (rowIndex, columnIndex);
    If (index > = 0) {}
    editedCells.removeItemAt (index);
    }
    }

    Add cell place the row/column pair in the Collection if they are not already:
    public static void addCell (rowIndex:Number, columnIndex:Number): void
    {
    Make sure that the cell does not exist yet - don't want to add twice
    If (isEditedCell (rowIndex, columnIndex)< 0="" )="">
    editedCells.addItem ({rowIndex:rowIndex, columnIndex:columnIndex});})
    }
    }
    Finally, I replace the data set function to change the color:

    override public function set data(value:Object):void
    {
    Super.Data = value;

    If (listData)
    {
    Determine the first visible line and a visible column

    var firstRow:Number = .verticalScrollPosition (listData.owner as DataGrid);
    var firstCol:Number = .horizontalScrollPosition (listData.owner as DataGrid);

    the listData.rowIndex is 1-based (not zero) and is based on the visible line. So, if
    the first visible row is 12 and the second row on the screen has changed, then
    listData.rowIndex will be 2. To fix this, is subtracted 1 and firstRow is added.
    A similar thing is done for the columnIndex (what is zero-based).

    var int index = isEditedCell (listData.rowIndex - 1, listData.columnIndex + firstRow and firstCol);

    Determine the color of the cell

    If (index > = 0)
    {
    setStyle ("color", 0xff0000);
    }
    else {}
    setStyle ("color", 0x000000);
    }
    }
    }

    I hope this helps.

  • How to change the color of pre-rendered screen.

    My question is how to change the color of the page that is displayed before a site is fully charged. So let's say I go to a site where the background color is red. Before the end of Firefox loading it will appear as white. Also yes I have known that I have an add-on which changes the default color of YouTube. However the first picture comes on all websites no matter if their background is white or not.

    You can try the userChrome.css code or elegant.

    Add code to the file userChrome.css below default @namespace.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    browser {background-color:#f0f0f0!important}
    

    The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the folder of chrome in the Firefox profile folder.

    You can use this button to go to the current Firefox profile folder:

    • Create the folder chrome (lowercase) in the .default < xxxxxxxx > profile folder if the folder does not exist
    • Use a text editor like Notepad to create a userChrome.css (new) file in the folder chrome (file name is case sensitive)
    • Paste the code in the userChrome.css file in the Editor window
    • Make sure that the userChrome.css file starts with the default @namespace line
    • Make sure that you select "All files" and not "text files" when you save the file via "save file as" in the text editor as userChrome.css.
      Otherwise, Windows can add a hidden .txt file extension and you end up with one does not not userChrome.css.txt file
  • How can I change the color to search for text in firefox?

    When you press CTRL + F in Firefox to make appear the text search and you search for a Word, the word is highlighted in this neon-green color. Is there a way to change the color of this? The green color is barely visible.

    As I mentioned in my first post, you can right-click and choose New > String to create the entry.

  • Change the color of the KING GROUP

    Hello

    can someone let me know if changing the colors of the KING when I grouped?

    I want the oval KING green or other colour than RED.

    In addition, the oval has an additional ANGLE line. Does anyone know how to get rid of it?

    Hey Krispiekream,

    In terms of getting rid of the extra line, I answered your last thread. What about the color change, unfortunately, return on investment will be one color. You can change this color with a property node, but I don't think that there is a way to change the color of each individual KING (and always keep a return on investment and does not convert the return on investment for an overlay).

Maybe you are looking for

  • What can I do to make my Satellite L750 run faster?

    Hello! First I should mention that I have no expertise on computers so I can look like a fool! I have a Satellite L750/L755 (8 GB of ram, I - 3) that runs very slowly (100% CPU when I do anything!) and it seems to be useless when it comes to playing

  • 5100 603 and USB 2.0?

    Is the Satellity 5100-603 a usb 2.0? I have XP with SP2. I keep invites when I add a USB hard drive message "this device can perform faster. If yes where can I get an updated driver. Thank you.

  • How to optimize the WRT 400n for Internet TV

    I've been using a WRT 400n for awhile with 2 pc... a tower near him and a computer laptop about 50 ft, in another room. As much, I would say I am only using the 2.4 GHz to channel 11 band. We have just added a Sony Bravia HD TV and a Sony Blu - ray p

  • Windows Vista cannot click the user login icons

    On Windows vista family premium, I can get to the login screen, but nothing happens when I click on a user icon, icon access or on the close icon, except that the highlights of icon (so I know the mouse works) how can I fix this and be able to connec

  • Availability of the monitor with Netmonitor

    Hello I'll put up Netmonitor for monitoring some devices. Until now I just he followed a single device to test. For some reason it isn't send me an alert if I cut the communication to the device. All the settings are default, and made sure the rule i