Copying images of vector sprites

Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default Re: Copying images of vector sprites

    The reg point of the image and the vector may not be in the same place, try
    setting both of the reg points to the same location.

    member("MyVector").reg = point(0,0)
    member("MyBitmap").reg = point(0,0)

    otherwise you can try to simply move the vector

    VectorRect = sprite(Bitmap).rect
    VectorRect[1] = VectorRect[1] +1
    VectorRect[2] = VectorRect[2] +1
    sprite(Vector).rect = VectorRec

    "Stephen Whipp" <Stephen.Whipp@btopenworld.com> wrote in message
    news:bfm302$jao$1@forums.macromedia.com...
    > Hi all, a quick question
    >
    > I'm copying the image of a vector sprite into a bitmap. The bitmap is
    the
    > precise height of the vector shapes image taking into account the
    > strokewidth, yet I'm finding a small problem.
    >
    > When using something like the following:
    >
    > shp = myVectorshape.image
    > srect = shp.rect
    > drect = rect(startx, 0, endx, srect[4])
    > myImage.copyPixels(shp, drect, srect)
    >
    > I find that the actual shape is not starting at 0 height but at 1... This
    > means that the bottom of my vector shape is being clipped (I'm assuming
    that
    > there is a one pixel border around the vectorshape's image). I know I can
    > fix this by Expanding the bitmap in my case, but I'd like to know if there
    > is a way of clipping the vectorshape member so that the image is precisely
    > the size of the actual drawing, or is this one pixel discrepency inherent.
    >
    > Thanks in advance
    >
    > --
    > Stephen Whipp
    > Eastmond Publishing Ltd. (UK)
    > -----------------------------------------------
    > Visit our website at:
    > [url]www.autograph-maths.com[/url]
    > ----------------------------------------------
    >
    >

    Kevin Fink Guest

  2. Similar Questions and Discussions

    1. Creating Quick Vector Images from Raster images
      Hi ! I am aware of the conventional methods to create vector images from raster images, i.e. drawing the lines individually, then adding...
    2. copying images from illustrator to photoshop
      When trying to copy an image from illustrator 10.0.3 to photoshop 7, photoshop freezes. When I move back to illustrator I get the following message...
    3. copying/pasting images in MacOS X
      This is just out of curiosity. I'm wondering how copying and pasting of images in MacOS X works. I'm assuming that Cocoa applications put PDF...
    4. Rotate Images (not sprites)
      Hi, I've downloaded some functions, from the net, to rotate a image a certain number of degrees, but the resulting image always comes out a...
    5. Copying images from Cd to hard drive
      It has been quite a long time since I have authored something. I now have a project where I want to show a contact sheet of images - if the user...
  3. #2

    Default Re: Copying images of vector sprites

    Oops actually I think it's regpoint, not reg
    member("MyBitmap").regpoint = point(0,0)
    "Kevin Fink" <cfink@rogers.com> wrote in message
    news:bfm906$2hl$1@forums.macromedia.com...
    > The reg point of the image and the vector may not be in the same place,
    try
    > setting both of the reg points to the same location.
    >
    > member("MyVector").reg = point(0,0)
    > member("MyBitmap").reg = point(0,0)
    >
    > otherwise you can try to simply move the vector
    >
    > VectorRect = sprite(Bitmap).rect
    > VectorRect[1] = VectorRect[1] +1
    > VectorRect[2] = VectorRect[2] +1
    > sprite(Vector).rect = VectorRec
    >
    > "Stephen Whipp" <Stephen.Whipp@btopenworld.com> wrote in message
    > news:bfm302$jao$1@forums.macromedia.com...
    > > Hi all, a quick question
    > >
    > > I'm copying the image of a vector sprite into a bitmap. The bitmap is
    > the
    > > precise height of the vector shapes image taking into account the
    > > strokewidth, yet I'm finding a small problem.
    > >
    > > When using something like the following:
    > >
    > > shp = myVectorshape.image
    > > srect = shp.rect
    > > drect = rect(startx, 0, endx, srect[4])
    > > myImage.copyPixels(shp, drect, srect)
    > >
    > > I find that the actual shape is not starting at 0 height but at 1...
    This
    > > means that the bottom of my vector shape is being clipped (I'm assuming
    > that
    > > there is a one pixel border around the vectorshape's image). I know I
    can
    > > fix this by Expanding the bitmap in my case, but I'd like to know if
    there
    > > is a way of clipping the vectorshape member so that the image is
    precisely
    > > the size of the actual drawing, or is this one pixel discrepency
    inherent.
    > >
    > > Thanks in advance
    > >
    > > --
    > > Stephen Whipp
    > > Eastmond Publishing Ltd. (UK)
    > > -----------------------------------------------
    > > Visit our website at:
    > > [url]www.autograph-maths.com[/url]
    > > ----------------------------------------------
    > >
    > >
    >
    >

    Kevin Fink Guest

  4. #3

    Default Copying images of vector sprites

    Hi all, a quick question

    I'm copying the image of a vector sprite into a bitmap. The bitmap is the
    precise height of the vector shapes image taking into account the
    strokewidth, yet I'm finding a small problem.

    When using something like the following:

    shp = myVectorshape.image
    srect = shp.rect
    drect = rect(startx, 0, endx, srect[4])
    myImage.copyPixels(shp, drect, srect)

    I find that the actual shape is not starting at 0 height but at 1... This
    means that the bottom of my vector shape is being clipped (I'm assuming that
    there is a one pixel border around the vectorshape's image). I know I can
    fix this by Expanding the bitmap in my case, but I'd like to know if there
    is a way of clipping the vectorshape member so that the image is precisely
    the size of the actual drawing, or is this one pixel discrepency inherent.

    Thanks in advance

    --
    Stephen Whipp
    Eastmond Publishing Ltd. (UK)
    -----------------------------------------------
    Visit our website at:
    [url]www.autograph-maths.com[/url]
    ----------------------------------------------


    Stephen Whipp Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139