Hi,
Could you tell me how I would go about placing an image at an arbitrary location inside another image's coordinate space? This must be dynamic (ie, I click somewhere within the "container" image, and the "child" image is removed from its current location and redisplayed where I clicked). I also need to know how to clip the child image to the container image's boundaries (because the "click" position will be the centre of the child image, not the top-left).
It may help to understand what I am trying to achieve here: I am writing a full-spectrum Colour Picker component, modelled on the Windows colour selection dialog. Thus, I need to show a crosshair image inside a colour swatch image, clipped at the edges.
Thanks for help,
Wayne
Could you tell me how I would go about placing an image at an arbitrary location inside another image's coordinate space? This must be dynamic (ie, I click somewhere within the "container" image, and the "child" image is removed from its current location and redisplayed where I clicked). I also need to know how to clip the child image to the container image's boundaries (because the "click" position will be the centre of the child image, not the top-left).
It may help to understand what I am trying to achieve here: I am writing a full-spectrum Colour Picker component, modelled on the Windows colour selection dialog. Thus, I need to show a crosshair image inside a colour swatch image, clipped at the edges.
Thanks for help,
Wayne
Comment