Fill shape with image

Hi,
I have drawn a curved box and wish to fill it with and image. I'm having trouble with this as the image is a rectangle and the box has curved edges. Is there any way which you can fill the box with the image. It will not matter if edges of the image are cut out.
Thanks in advance
Euan

> I'm having problems copying layers.
I take it this is a separate question? (no need to copy layers for what I suggested before)
Highlight a layer in the layers palette, then press CTRL+J (windows) or Command+J (Mac) if you want a duplicate.
Otherwise, highlight the layer, press CTRL+A (windows) or Command+A(Mac) , then CTRL+C (windows) or Command+C (Mac) and then you can paste it where you want.

Similar Messages

  • Fill Shape With Picture? student

    Hello,
    Is there a way to draw a shape and then fill it with a picture from a file?
    Also, I'm not sure if that is the best way to put pictures into the program I am making... any advice?
    - Jason

    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class ShapeImage {
        private JScrollPane getContent(BufferedImage source) {
            BufferedImage framed = getFramedImage(source);
            Box box = Box.createHorizontalBox();
            box.add(Box.createHorizontalGlue());
            box.add(new JLabel(new ImageIcon(source)));
            box.add(Box.createHorizontalGlue());
            box.add(new JLabel(new ImageIcon(framed)));
            box.add(Box.createHorizontalGlue());
            return new JScrollPane(box);
        private BufferedImage getFramedImage(BufferedImage image) {
            int w = 160, h = 160;                   // shape/frame size
            int type = BufferedImage.TYPE_INT_RGB;  // other options
            BufferedImage out = new BufferedImage(w, h, type);
            Graphics2D g2 = out.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            Ellipse2D circle = new Ellipse2D.Double(0,0,w-1,h-1);
            // Center image in circle frame.
            double x = (w - image.getWidth())/2;
            double y = (h - image.getHeight())/2;
            AffineTransform at = AffineTransform.getTranslateInstance(x,y);
            g2.drawRenderedImage(image, at);
            // Mask out image pixels that lie outside of the circle disk.
            Area mask = new Area(new Rectangle(0,0,w,h));
            mask.subtract(new Area(circle));
            // Use the desired background color.
            g2.setPaint(UIManager.getColor("Panel.background"));
            g2.fill(mask);
            // Draw the circle/shape frame.
            g2.setPaint(Color.red);
            g2.draw(circle);
            g2.dispose();
            return out;
        public static void main(String[] args) throws IOException {
            BufferedImage image = ImageIO.read(new File("images/cougar.jpg"));
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new ShapeImage().getContent(image));
            f.pack();
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • How to fill shape with pattern... and cut outline?

    I have an old plotter that works great for making drawings. I can fill a shape with a pattern, convert the pattern to outlines (or strokes) BUT my problem is that the outline of the original shape remains, and this will be plotted. I do not want an outline of the original shape, I want the pattern to create the shape. Any ideas? Also, shape stroke remains part of the art (even if stroke = none before object/expand/ungroup/divide)

    aha!
    made scribble
    expanded scribble
    put shape in front
    select all, ctrl+7 (masked scribble to shape)
    pathfinder/crop
    solved. thanks! sishamDSS!

  • Fill shape with pen tool

    Hi there,
    this might be a very simple question, but couldn't figure it out ..
    I made a Title in Premiere and I want to draw a shape with the pen tool.
    However this only results into a shape with line instead of it being filled.
    So my question: how to draw a filled shape in Premiere Pro with the pen tool?
    Thanks in advance

    Set Graphic Type to Filled Bezier, that will fill the shape.

  • Fill shape with a pattern

    Hi,
    I am drawing some shapes using java.awt.Shape, java.awt.geom.Area and java.awt.geom.GeneralPath and would like to know whether it's possible to fill these closed shapes with a color - or even better - with a pattern.
    Thanks!

    er, yes, why not?
    http://java.sun.com/docs/books/tutorial/2d/geometry/strokeandfill.html
    -Puce

  • Fill shape with 2 solid colors

    Hi,
    I was wondering if there is an easy way to fill a roundRectangle2D with 2 solid colors. For example that 1/3 is blue and the other 2/3 is green? I've looked in the java graphics2D api but can't find anything. GradientPaint isn't what I'm looking for, so is there any other easy option.
    Or is it the hard way and you need to draw several shapes on top of each other?
    class EventPanel extends JComponent{
        @Override
        protected void paintComponent(Graphics g){
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D) g.create();
            Double widthRect = (double) this.getWidth();
            Double heightRect = (double) this.getHeight();
            Double arc = widthRect / 20.0;
            Float strokeSize = 1.0f;
            Double offset = strokeSize / 2.0;
            Double adj = offset * 2;
            RoundRectangle2D.Double roundRect = new RoundRectangle2D.Double(offset, offset, widthRect - adj, heightRect - adj, arc, arc);
            RenderingHints rh = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setRenderingHints(rh);
            g2.setPaint(new Color(30, 144, 255, 80));
            g2.fill(roundRect);
            g2.setPaint(Color.BLACK);
            g2.setStroke(new BasicStroke(strokeSize));
            g2.draw(roundRect);
            g2.dispose();
        }Similar to this: Example Don't mind the quality. Not good at art.
    Edited by: Kligham on 26-aug-2010 22:55
    Edited by: Kligham on 26-aug-2010 22:58
    Edited by: Kligham on 26-aug-2010 23:01

    Or is it the hard way and you need to draw several shapes on top of each other?What's so hard about that? But if you're looking for an alternative approach, you can do it with Graphicd$setClip(...)
    GradientPaint isn't what I'm looking forWhat about LinearGradientPaint?import java.awt.*;
    import javax.swing.*;
    public class StepGradientPaint {
      float[] fractions = {0F, 0.5F, 0.50001F, 1F};
      Color[] colors = {Color.RED, Color.RED, Color.GREEN, Color.GREEN};
      Paint paint = new LinearGradientPaint(0F, 0F, 200F, 0F, fractions, colors);
      public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
          @Override
          public void run() {
            new StepGradientPaint().makeUI();
      public void makeUI() {
        JPanel panel = new JPanel() {
          @Override
          protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D) g.create();
            g2.setPaint(paint);
            g2.fillRect(0, 0, getWidth(), getHeight());
            g2.dispose();
        panel.setPreferredSize(new Dimension(200, 200));
        JFrame frame = new JFrame();
        frame.add(panel);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }db

  • Fill Shape with text

    I'm trying to Fill Number 9 with text but I always get this :
    I want to have the circle inside without text !
    Someone Can help me ?
    Sorry Im newbie  :/

    I know you know a lot more about the internals than I do, Chris, and I hate to be argumentative, but I'm just not seeing the difficulty...
    Consider that the text placement code as written today can deal with the following (hastily drawn path).
    And as Paulo points out, Photoshop clearly already knows what's "inside" and what's "outside" a complex path.
    Emil makes a good point about the readbility suffering if one has to follow it across breaks in the figure...
    Still, who's to say whether someone wouldn't come up with a good use for this.  Bottom line is this - here you have a user expecting Photoshop to do something that's expected, and it's falling short because of the implementation and not allowing him to express his creativity the way he wants....
    This exercise DID bring one new idea to mind possibly for hhtun...  Try using a stencil font!
    -Noel

  • Change image background of a shape with applescript in keynote

    Hi,
    I want to create an applescript that allow to change background fill of a shape in keynote.
    I saw background fill type is r/o ( I guess read only ), but can we change only the image file if the shape is in image fill state with already an image.
    I work with an mac book air, mac os mavericks, keynote 6.
    Thanks.

    In your assignment statement you should remove the "string(....)" XPATH method. So if you use
    xpath(BookMessage,"/*[local-name()='BookMessage' and namespace-uri()='http://UntypeMessage.Book']/@*[local-name()='Author' and namespace-uri()='']")=AuthorName;
    it will work. Now the Left-Hand-Side of the expression does evaluate to a node set (in this case it would evaluate to an XmlAttribute).
    Regards.

  • Cannot fill a rectangular shape with Color

    HI,
    I cannot fill a rectangular shape with color. I know it was working at some point. I checked the ID help, and did a search here with no results.
    I have the tool bar set correctly I think (see below). The object isn't behind other objects either, - that I can see. I do see it when I use the scroll bar so it's there somewhere. (see Pink box below).
    Any ideas profound or otherwise?
    Thenk Yew.

    You haven't got 100% transparency applied to it?  Then it might appear while scrolling because of a slightly delayed display.  That's all I can think of at the moment...
    The other thing to try if you suspect an individual document is playing up is to export it to inx or idml and open that.  Then another thing is to try replacing your preferences.

  • How to draw a shape with line tool then fill with colour

    How can i draw a shape with the line tool and then fill it with colour

    Click and drag from one anchor point to the next, making sure that each new line segment begins where the last one ended. The Line Tool will snap onto the anchors.
    Once you're done creating what looks like a closed path, the lines are still separate objects. To combine them into one path, select them all and press Ctrl/Cmd+J (for Join) or via the menu select Object > Path > Join.
    The Pen Tool can be used in a similar manner, but each segment will be a continuation rather than a separate object. The last (closing) click will be indicated by a tiny circle on the mouse pointer.
    If you make an open path, Ai will still "fill" it with a fill color by assuming a straight path between the last open anchor points. Individual straight paths, however, such as those drawn by the line tool, have no "inside", so they won't show the fill color even if you have assigned one.
    Allen

  • How can i fill letters with an image

    I am extremely new to mac software, I loved publisher on ms. I want to do bold lettering for wall displays but I want to fill the letters with images of what the heading is about. For example, when I did the vikings, I wrote each individual letter out very big and filled the letter with an image relating to the vikings, I am assuming this is possible on the mac, but I can't figure it out. Please help. I need my labelling done before I get back after the summer break!

    If you installed Windows on your MBP (Bootcamp or Parallels) you could use the same software.  Otherwise you will have to search of a Mac compatible version or some other alternative.
    Ciao.

  • Crop and fill with image

    Hello
    I intend to use lasso for free style cropping an image, but I want to the fill in that cropped section with another image. I intend to , say crop a dress floral pattern on a sleeve, and fill it with another floral pattern of my choice.
    Thanks

    Hi there,
    Here's a quick tutorial for working with masks to replace patterns and textures in an image.
    1) Here's my starting image, and I want to replace the fabric on the pocket of this shirt.
    2) Bring in the pattern you want to incorporate into your original image by copy and pasting or by going to File > Place.
    3) With the pattern layer selected, option + click on the icon marked below to create a mask over the layer. The image will seem to disappear, but this is only because the mask is solid black— black in the mask indicates hidden areas, white areas are where the image will be revealed.
    4) Use the lasso tool to select the area in which you want the pattern to appear.
    5) Being sure the mask is selected in the layers panel, use the paint bucket to fill in the selection area with white. The pattern will appear.
    My next steps would then be to paint on the mask with black to reveal the stitched areas and the button on the pocket. Alternatively, as Silkrooster said, you can experiment with blend modes. Below is the pattern layer set to Multiply. Using this setting would work well if you were placing a pattern over a white or light-colored garment. Good luck!

  • Fill shape drawn with pen tool

    There are three posts dealing with this issue and each time the person who posted the problem said they figured it out but did not say what they did.  Here is the problem:
    I draw a shape with the pen tool in Flash CS4.  I made sure the shape was closed.  But, I cannot fill the shape no matter what.  Paint bucket tool does not work.  Whatever I do, I get the red diagonal line on the fill color.  I can fill a shape with the rectangle or oval tools but not the pen tool.
    Please help.  Thanks.

    Thanks for your help.  I tried what you suggested but the union selection was grayed out.  I was in the drawing object mode.  But after fooling with it for a bit the following worked (I'm still not sure why):
    I double clicked on the object with the selection tool.
    I then selected a fill color in the property panel and it filled in.
    However, I cannot replicate this.  I tried drawing another shape with the pen tool and cannot fill it in.  I tried converting it to a symbol and that did not work either.  I must have done something to the original shape that allowed me to fill it in last time I fooled with it.

  • PE 7-  Help with Filling Shapes

    Having trouble with something pretty basic (I thought)...
    How do I fill a shape (rectangle, circle, etc) that I create on a Title from the toolbar?
    When I select one of the shape tools, I can create one in the Title area but I can't figure out how to fill it with color.
    Tried COLOR PROPERTIES but FILL is not 'active'.
    Appreciate some enlightenment on this.
    Thanks!
    John
    sr71 -at- comcast.net

    My mistake... OOPS!
    I selected a TITLE that must have had a transparent background (BLUENOTES_LWR_THIRD).
    I usually start by selecting any TITLE then deleting the default graphics in it to create a black b/g.
    From there, I make copies of the b/g and use those for my custom titles (Intro, end, etc.) which I add TEXT to.
    Once I selected GENERIC1_TITLE, and deleted the default graphics, I was able to add RECTANGLE to it
    and modify the fill color.
    I know there's probably an easier/better way to create titles; just haven't had the time to 'explore' more.
    Thanks for the quick reply!
    John

  • Creating a symbol from shape with gaussian blur = problem

    I am trying to create artwork to map to a globe using the 3D revolve effect...the problem is the shape/layer I'm using to create the "glow" effect (compound path filled with white and a gaussian blur applied):
    When I create a symbol out of this, here is the problem (note the "excess" areas on the top and right):
    ...resulting in this messed up globe...
    Doing an outer glow effect instead of gaussian blur results in the same thing (its definitely the blur causing this, deleting the shape fixes the problem).  Expanding the shape with the blur results in an image the same size as the bounding box in image 2 above. Any ideas how to address this?
    thx

    Yep, that did it! (something strange going on now with the longitude/latitude lines going thru India, but I'll work on that later)...Thank you!

Maybe you are looking for

  • Purchase & Material Usage Report

    Hi, Is there any report which can display the following data? 1) last purchase date 2) last date on which the material was issued from stock? I have about 10,000+ materials and wanted to see the above data for all in one report. Sincerely, Puja

  • Function module to input dates

    Hi All, Require function module where i can input From Date and To Dates as input parameters. This should appear as a dialog box.

  • How do I resize a vector illustration in Freehand

    Hi there, I hope someone can help me. I downloaded a vector illustration (that I paid for), into Freehand and I am struggling to understand how I resize the illustration in Freehand to A5. Can someone help me? I'm not a major user of the software and

  • Microsoft.ServiceBus.Messaging.QueueClient ReceiveBatchAsync?

    This method would seem to be useful for reading multiple message from a queue but I've yet to get more than one. var messages = await client.ReceiveBatchAsync(50); await client.CompleteBatchAsync(messages.Select(m => m.LockToken).ToArray()); Where cl

  • List of SAP Modules applicable to a Pharmaceutical Organization

    Hi, I am looking for list of SAP Modules applicable to Pharmaceuticals Organization. Please let me where can I find this information. Regards, Shruti