This Question is Assumed Answered

1 "correct" answer available (5 pts) 15 "helpful" answers available (3 pts)
5 Replies Last post: Aug 6, 2008 5:24 AM by Kamal

The drag-graphic of dragee

Aug 4, 2008 6:13 PM

Click to view phiyano's profile Level 1 phiyano 13 posts since
Aug 4, 2008

I was trying to use a custom picture ( .ICO file) for dragee's drag-graphic, the code is something like this:

set self.dragee = {ImageDragee
drag-graphic =
{Frame
height = 40px,
width = 40px,
background = {FillPattern.from-url {url img-url}}}}

where img-url is a url points to my icon1.ICO (normal 32X32 ico file).

But when the drag operation started, the drag-graphic seems a lot more bigger, definitely not 40px * 40px.

Did I do somthing wrong?

Click to view Duke's profile Curl Duke 154 posts since
Oct 17, 2007
1. Re: The drag-graphic of dragee Aug 4, 2008 6:58 PM
Which Curl version are you using (all three numbers please, i.e. 5.0.4)? Which OS? Do you know if you are using anti-aliasing? It sounds like you might have found a bug in Curl.
Click to view phiyano's profile Level 1 phiyano 13 posts since
Aug 4, 2008
2. Re: The drag-graphic of dragee Aug 4, 2008 7:11 PM
in response to: Duke

Which Curl version are you using ? Which OS?

Windows XP Pro, Curl 6.0.0 (downloaded from curl website)

Do you know if you are using anti-aliasing?

No, I did not set any rendering-mode, there is no anti-aliasing.

Click to view Kamal's profile Curl Kamal 139 posts since
Oct 17, 2007
3. Re: The drag-graphic of dragee Aug 5, 2008 6:03 AM
Which version of Curl are you using? Did you add the support for ICO MIME type? If not, then you should have seen an "Invalid MIME Type" error message.

Is it possible that in your code you are resetting the dragee to some other object?

Use a simpler example like below and see if you still see the problem. Note that you will have to replace "your-url" with the url of the image file you want to use.


{Frame
    height = 2in, width = 2in,
    background = "lime",
    dragee =
        {ImageDragee
                 drag-graphic =
                     {Frame
                         height = 40px,
                         width = 40px,
                           background = {FillPattern.from-url your-url}
                     }
        }
}
 
Click to view phiyano's profile Level 1 phiyano 13 posts since
Aug 4, 2008
4. Re: The drag-graphic of dragee Aug 6, 2008 2:43 AM
in response to: Kamal

Did you add the support for ICO MIME type?

Yes, the icon file is OK, and it is working on your demo.

Is it possible that in your code you are resetting the dragee to some other object?

Yes, I did set the dragee as null on other condition.

Use a simpler example like below and see if you still see the problem.

Yes, the problem is gone, but I am still a little confusing about my example, how did the "enlarging" thing happen? Any chance that will happen?

Click to view Kamal's profile Curl Kamal 139 posts since
Oct 17, 2007
5. Re: The drag-graphic of dragee Aug 6, 2008 5:24 AM
in response to: phiyano
If you see this problem again you can send your code and I will try to help you out with it. Look at all the places where you are setting the dragee and see what graphical objects you are setting it with. Setting it to null for a Graphic means that the object is not drag-able. Search for places where you are setting the dragee to a non-null value.