Well I think the title says it all. Also can that box be larger than the icon??
Edit: I'm trying to create create a box and update it each time the mouse is dragged.
DrawBox() isn't itself all that slow. What's slow is the overhead of the proc calls, and of loading the icon in the first place.
The box is always clipped to the icon size; you can use Crop() or Scale() to make the icon larger before you draw. |
So is there any library that can draw a box on drag selection??
I've tried creating one by scaling to where the mouse pointer is and updating the box but when mouse pointer goes before icons (0,0) it won't work. |
Icon manipulation is not what you want for this. I would suggest having a few line icons that you stretch to form the box.
|
Like Lummox said, stretching transforms of 4 pixels is the right way to go. This example is for the client.screen:
box The Translate is to fix the offset, since scaling is contrasted to the center. |
Also yes the box can be larger than the icon, but won't draw any pixels that aren't within range of the dimensions.