Jump to content
Developer Wiki and Function Reference Links ×

scaling a bitmap object


SYLVAIN

Recommended Posts

Thanks for advices. I finally made it.

2 conditions seems to be necessary to make it work properly :

1- the image must be in a group (it can be alone in it)

2- Redraw or resetobject

this one works :

PROCEDURE scale;

VAR

ppX,ppY:REAL;

photo:HANDLE;

BEGIN

GetPt(ppX, ppY);

photo:=PickObject(ppX, ppY);

SetSelect(photo);

group;

HScale2D(FSActLayer,0,0,2,2,TRUE);

ResetObject(photo);

END;

run(scale);

Link to comment

The problem is that the bitmap is a fixed 'rectangle', so it will always have square corners. If the bitmap has an other rotation then 0? or 90?, it will not scale. Same thing goes for the new rectangles (2008), you can't scale them either when they are rotated.

BTW, i think that the lines SetSelect(photo); and group; aren't necessary.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...