CustomFilterCallback width and height
CustomFilterCallback width and height
It would be great if the width and height of the object being drawn would be passed automatically to the callback function. It would allow for filters like a vignet, transition from SourceColor on the left to TargetColor on the right etc. All kind of filters where it is important to know the size of the object being drawn.
-
- Addict
- Posts: 1264
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
That was indeed what I was looking for but now I see the x and y are also output coordinates.Seymour Clufley wrote:I think he means the object such as the image in DrawImage() or the text in DrawText().
What I was looking for are the x, y, width and height of the source object.
That would make it possible to merge the SourceColor and TargetColor based on the distance from the source coordinate being drawn to the center of the source object so a vignet would be possible but also things like focal saturation.
Why not set the values in a global structure before the filter is used?wilbert wrote:That was indeed what I was looking for but now I see the x and y are also output coordinates.Seymour Clufley wrote:I think he means the object such as the image in DrawImage() or the text in DrawText().
What I was looking for are the x, y, width and height of the source object.
That would make it possible to merge the SourceColor and TargetColor based on the distance from the source coordinate being drawn to the center of the source object so a vignet would be possible but also things like focal saturation.