Trouble positioning ellipse in new layer

I created  new layer in my document, and then a new ellipse inside that layer.
I am trying to position the new ellipse at the top of the layer (vertically) and in the center of layer along the x axis (horizontally).
Nothing I have tried seems to move the object left of the layers starting x position (I can move it right just fine!?!).
I am confused because my top and height properties of the layer are negative numbers - but when I look at the ruler, all are above zero?
What am I doing wrong in terms of positioning the ellipse in the layer?
Here is a sample of my script:
var childLayer = currentLayer.layers[j];
var xmin = childLayer.pageItems[0].geometricBounds[0].toFixed(2); // top
var ymin = childLayer.pageItems[0].geometricBounds[1].toFixed(2); // left
var xmax = childLayer.pageItems[0].geometricBounds[2].toFixed(2); // bottom
var ymax = childLayer.pageItems[0].geometricBounds[3].toFixed(2); // right
var newBoneLayer = boneLayer.layers.add();
newBoneLayer.name = childLayer.name.replace(OBJECT_MARKER, "");
var halfOfWidth = parseFloat(childLayer.pageItems[0].width/2).toFixed(2);
var boneGuideXPosition = parseFloat(xmin + halfOfWidth).toFixed(2);
var boneGuide = newBoneLayer.pathItems.ellipse(ymin,boneGuideXPosition, 10.0, 10.0, true, false);
boneGuide.stroked = true; 
boneGuide.filled = true; 
boneGuide.opacity = 40.0; // set to 40% opacity
var newRGBColor = new RGBColor();
newRGBColor.red = 204;
newRGBColor.green = 255;
newRGBColor.blue = 255;
boneGuide.fillColor = newRGBColor;

For example if I change your code to this I'm closer, but the circles end up on the far right hand corner of each layer (not centered):
var TOmm = 2.83466796875;
var AB = childLayer.pageItems[0].geometricBounds; //var AB = _doc.artboards[0].artboardRect;
var x = AB[0]+(AB[2]/2);
var y = AB[1];
var w = 3*TOmm // ellipse Width
var h = 3*TOmm // ellipse Height
var boneGuide = newBoneLayer.pathItems.ellipse(y,x-(w/2), w, h, true, true);
It results in this:

Similar Messages

  • Question on design of new layer comps feature

    The new layer comp feature in Photoshop CC 2014 is great. It allows you to access the layer comps within smart objects from another file.
    One very important aspect seem to have gone missing though: Imagine you have 1 master document (e.g. website mockup) with several smart objects inside it (e.g. popup menus). Each of the smart objects have layer comps (e.g. folded / unfolded states) that I can access from the master document. Great!
    Now I want to save a layer comp in the master object that reconfigures layer comps on the various sub smart objects (e.g. showing menus opened/closed). This doesn't work.
    The reason it doesn't work is that a "published" layer comp on a smart object is a property of the smart object. A layer comp can only save visibility/layer styles/position but not properties. So I am forced to manually change the layer comp of all my included smart objects in order to reach the target look of my master document. This makes the feature much less useful.
    Am I missing something? It seems like such an obvious feature to have. Have you considered this when you designed the layer comps feature? Will it be an upcoming feature?

    I have the exact same problem. I thought this was the whole point of smart objects with layer comp states. Without this feature it seems pointless. 
    Avoiding having multiple layers is the reason you would use this. Now all we achieve is having smart objects instead of folders. Pretty ridiculous I must say.
    It even seemed from the presentation of the "new and improved layer comps" that you could do this. They skip that specific functionality, but it seems implicit in the presentation.
    Other thing is that the update position, style and visibility are buggy as hell. And another obvious feature of updating text-fields is missing as well.
    So we have to find plugins to help us. BUT cc 2014 doesnt allow for flash plugins and no HTML5 plugins are available. Thank you Adobe!

  • How to paste paths to a new layer ??

    I`m having trouble pasting paths to a new layer from a current layer....
    I select the paths - edit/cut - select the new layer as visible and blue highlighted in the layers palette - edit/paste... the paths get pasted back to the previous layer instead of the new layer...
    I would also like it if I could use "paste in front" to have them paste into the same xy location in the new layer.

    On the layers palette, right click on the three little lines at the top
    At the bottom of the list you will see an option of "Paste remembers layers"
    Untick it
    I'll bet that solves it

  • Copy to New Layer

    Simple gray scale photo of kite in sky. The kite is not completely surrounded by sky, part of it is out of the shot. I want to make the sky flash the gray it is now to white(gif). I used the polygonal lasso tool to select the sky. I dont know how to copy it to a new layer so I can change the exposure and make one frame with the original layer showing, another with the exposed layer showing. After I select with the lasso, all the items under "layer" are grayed out including "new". I tried the new layer icon at the bottom of the palette but no go. The closest I have come is edit>copy but where to put it?
    Also, if I lasso the kite, isnt it subjective which is the background and which is the foreground?
    Anyway, thanks for any help!

    Thanks for that Bob. Got it. But having trouble finishing project. Progress so far: Lassoed the kite. Layer via copy. Now in layers palette have a thumbnail with the sky I want and the outline of the kite still visible (background)and one with just the kite with checker board sky(Layer 1). image>adjustments>exposure, 5.20 exposure/+0.2400 offset, changing the dark gray sky to 'white'. Opened the animation palette and now have kite (layer 1) as first frame. Frame delay, tweening, duplicating frames to tweak the animation I can do but the one thing missing is a frame with the "original" photo in it so the animation will flit between dark gray sky and white sky. Im guessing animation frames come from layers of the photo being worked on. So I cant just use the original as the second frame because the focus, for lack of the right term, of the palettes shift to THAT photo when I open it. How do I get the kite with the dark gray sky into the animation?
    Thank you ever so much!

  • I have been trying to watch tutorials on how layering works. All I want to do is this: I have one image of a radio with a white background. I need to have just the radio extracted, then on a new layer (white one/blank/plain) I need to copy and paste the i

    I have been trying to watch tutorials on how layering works. All I want to do is this: I have one image of a radio with a white background. I need to have just the radio extracted, then on a new layer (white one/blank/plain) I need to copy and paste the image of the radio two times. How can I DO THIS!?!?!?! Thanks!

    In Editor, go to the expert tab.
    Open picture B, the one you wish to select the radio from to add to another picture.
    Use one of the selection tools, e.g. selection brush, lasso tool, to select the object. You will see an outline ("marching ants") once the selection is complete
    Go to Edit menu>copy to copy the selection to the clipboard
    Open picture A, then go to Edit>paste
    Use the move tool to position object from picture B.
    In the layers palette you should see picture A as the background layer, and the radio B on a separate layer.

  • Creating a New Layer Using Icons in Adjustment Palette

    When creating a new layer using the icons in the adjustments palette and holding ALT in CS5 a dialog box would appear before creating the new layer.  At this point you could rename the layer change the blending mode etc.
    In CS6 I do not get the dialog box to appear the new layer is just created.  I've tried to reset my preference twice and this has not help. Any ideas?

    JJMack wrote:
    Your memory has failed
    On the contrary, your memory may have failed.
    ACJ81 is correct (at least as far as Ps on OS X is concerned) and the problem was mentioned in the forum not too long ago. In CS5, Alt-clicking an icon in Adjustments panel does cause a New Layer dialog to pop open and the dialog fails to appear in CS6.
    In CS6 and CS5, the dialog will appear if you pick an Adj Lyr from the Layer > New Adjustment Layer submenu, both with or without Alt modifier. (That lack of control over the appearance of an optional dialog when picking from a menu is an inconsistency in the interface.)
    In CS6 and CS5, the dialog will appear if you Alt-click the black and white circle at bottom of Layers panel then pick an Adj Lyr from the menu, as Noel said.

  • Creating a new layer request...

    Does anyone know of a plugin that when creating a new layer, the name of the layer is immediately editable or which brings up a dialog window prompting you to name it, as in photoshop and illustrator?
    This would really speed things up.
    Thanks,

    Yeah I knew that but it means you gotta use the mouse to click on it which just a pain all the time. I avoid using the mouse whenever possible.
    I was hoping a new layer with the name immediately editable could be done with one gesture.
    For example in photoshop, you do the short cut for new layer which is ⌥⌘N and that brings up a window with the layer name immediately editable. No mouse needed.
    Thanks for your help anyway!

  • Add a New Layer As a Last Layer

    Hi Friends,
    How to  Add a New Layer As a Last Layer in indesign scripting.
    If the Document has 5 layers in the sense,the newly added Layer should be the 6th Layer.
    Please Give ideas.

    JesRoberts wrote:
    .. If the Document has 5 layers in the sense,the newly added Layer should be the 6th Layer.
    Please Give ideas.
    Adding a layer to a set of five will automatically make this the 6th. I cannot see any other way.

  • I cannot copy and paste to a new layer in PSCC

    I am trying to use the magnetic lasso tool to outline my product and move that product to it's own layer so I can create a banner.
    The lasso will not turn off, I have made sure it met the beginning of the outline, and I have clicked enter. I was instructed to copy the product and paste it and it will show up as a new layer. I am concerned that I have something set or not set that would cause the tools to stick, and that I am missing a step between copy and paste.
    Can someone please help me or direct me to a tutorial that will cover these subjects? I have been trying to figure it out on my own for two days.
    Thanks,

    I actually found under  EDIT then Catalog settings / then metadata that the automatic write changes to XMP had been unchecked. Once I check this, it updated and connected all the keywords to the pictures. Now when I copy and paste the keywords show up as I can now detect them in Adobe bridge when before I couldn't see them even though they were in lightroom. . Thanks for your input.

  • Installing new layer styles in PSE 7

    What is the correct way to install new layer styles into pse 7? ( I use Vista)
    Do I move my extracted style file into the layer styles folder by following this pathway: program data>adobe>photoshop elements>7.0>photo creations>layer styles.
    Do I need to create a metafile too?
    Thank you for helping me, I have about a dozen styles I need to add, but I am unsure how to get it done properly.

    Hello,
    You need to create a metadata.xml file too to view it in a specific category of your choioce.
    You need to paste the two things :
    1) .asl file.
    2) metadata.xml,
    to the following location:
    C:\ProgramData\Adobe\Photoshop Elements\8.0\Photo Creations\layer styles.
    Here you need to add the two files and relaunch PSE. This will show you the presets in the layer styles category with.
    While creating the metadat.xml file you need to take care of two things:
    1) Add a new category name so that you can easily find them.
    2) You need to verify that Type value is set "Style  as mentioned :  <type value="style" />
    Hope this helps you.

  • Best Practice - Changing description for Org Unit/Position or creating new?

    Hello Freinds,
    I just want to know from your experience what's normally practiced in your implementations for OM :-
    For scenarios where there is a need to change the description of a particular org unit or position, do u
    1. just change the description effective a particular date (to maintain history) or
    2. put an end date to those objects and create new ones ?
    Solution 1 is quick and easy, but in IT0001 the description displayed is as on start date of that infotype which is normally a date prior to the change in desc of those objects. As a result this infotype keeps displaying old description.
    Is there any way to change this display to show the current description instead of the description as on start date of this infotype ???
    Solution 2 calls for a lot of related activities, say if i create a new org unit and delemit the old one - then i have to move all the sub org units and positions into this new one ... which is quite time consuming and doesn't really seem practical.
    How do u manage such scenarios ?
    Thanks
    Allen

    We use option #1, although I am not sure this is best practice.  Using option 1 for positions makes it challenging when it comes to reporting on length of time in position.  We frequently have the scenario where a person is reorged not because they applied for another position, but just because the big wigs want to move around the chess pieces.  In these cases we simply modify the position attributes and then run a PA action.  Then if you run a query and use the standard delivered Length of time in position field, it appears as if the person has been in the same position for years (which they have), but their position has been retitled, re-graded, and re-orged numerous times.  This makes it very difficult to get to an employee's length of time in their role. 
    This is a great discussion question I hope more people respond with what they do and why.

  • Photoshop cs6 with OS X Yosemite, I open a new layer and i paint on it but if I use cmd Z  it does not undo fluently the most of the time.

    Photoshop cs6 with OS X Yosemite, I open a new layer and i paint on it but if I use cmd Z  it does not undo fluently the most of the time.

    Grab the plug-in posted here:  http://helpx.adobe.com/photoshop/kb/photoshop-menus-turn-white-mac.html
    That should get everything working as expected on Yosemite.

  • CC 2014 nik efex - My Nik Efex filters are not working in Photoshop CC 2014 - they appear under plug-ins and seem to work, but after running and clicking okay, no new layer appears - seems to have no effect.  The separate menu panel does not appear either

    My Nik Efex filters are not working in Photoshop CC 2014 - they appear under plug-ins and seem to work, but after running and clicking okay, no new layer appears - seems to have no effect.  The separate menu panel does not appear either.  Help with this?

    BINGO !!!!
    Thanks so much Woodsroad. I had the exact same problem with my Dell Windows 7 64 bit with AMD Radeon 6700 Video card.
    All the video tests passed with flying colors.
    The sniffer rename trick fixed the problem.
    Thank goodness for the internet!

  • Having trouble installing ProIX on new Windows 8 machine after XP crash.  Get almost ll of the way through and get an error box ... contact system support.  Only way out is to abort and then it un-installs.  Wondering if a licensing max issue since we did

    having trouble installing ProIX on new Windows 8 machine after XP crash.  Get almost ll of the way through and get an error box ... contact system support.  Only way out is to abort and then it un-installs.  Wondering if a licensing max issue since we didn't get an opportunity to uninstall off of crashed machine?

    Hey robr72339266,
    With a single user license, you can install Acrobat on maximum two computers, say, your laptop at work and desktop at office.
    But, you cannot use Acrobat on both the machines simultaneously.
    You will first need to deactivate Acrobat from the old machine, then install and activate the software on the new OS with the same serial key.
    Please Contact | Adobe to seek help on the same.
    Regards,
    Anubha

  • CS4 - New layer won't show added color overlay, gradient, patterns?

    I'm using CS4 Extended for a few years... its been working fine but all of a sudden my layers are blank? I've tried Google but can't find a solution. Started a new graphic for a label using a 300dpi resolution, 23.250" inches wide and 2.500" high. Filled it with Black, then attempted to create a new layer to create a semi-transparent pattern above the black. It shows up in the layers column but the actual new layer doesn't show up on the artwork workspace. I can add text in color as a new layer, but the pattern layer doesn't show. Went and tried using an existing file... old layers work fine, but try to add any new layer other than text and it doesn't show. I know this is something dumb that I somehow clicked on and I'll kick myself when somebody tells me to check.... whatever LOL.
    Thanks in advance and don't laugh.

    Does the ext directory have the php_oci8.dll? In the original steps the PHP dir is renamed. In the given php.in the extension_dir looks like it has been updated correctly. Since PHP distributes php_oci8.dll by default I reckon there would be a very good chance that the problem was somewhere else. Since this is an old thread I don't think we'll get much value from speculation.
    -- cj

Maybe you are looking for