Closed Shadowblitz16 closed 5 months ago
Please provide detailed explanation on what this method should do with parameters description. I am not sure I completely understand
@generalloki this is a nine patch
basicly src would be a image sub rectangle, dst would be where it would be drawn and the patch rectangle would define the middle slice out of the src rectangle
Now I understand. So this could be useful for backgrounds with round corners. Do you have ready images that are freeware and could be used for testing/demo purposes for this method? Also I have added TextureBrush issue as #116.
Also we have in Graphics:
RoundedRectangle(Pen pen, Brush brush, RectD rectangle, double cornerRadius)
here is a image. I made it so you can test the following...
Thanks I will use it in demo. I also found button image generator https://www.clickminded.com/button-generator/ and generated another sample image for the demo
I added DrawingUtils.DrawSlicedImage. Example is in AlternetUI\Source\Samples\ControlsSample\InternalSamples\NinePatchDrawing\ TextureBrush is used to fill expanded space.
I added DrawingUtils.DrawSlicedImage. Example is in AlternetUI\Source\Samples\ControlsSample\InternalSamples\NinePatchDrawing TextureBrush is used to fill expanded space.
Is this a extension method for Alternet.Drawing.Graphics?
DrawSlicedImage is static method of DrawingUtils. Not an extension method.
DrawSlicedImage is static method of DrawingUtils. Not an extension method.
Can you make it a extension method?
Also you might want to call it DrawImageSliced to be consistent with DrawImageUnscaled
Renamed to DrawImageSliced and made an extension method to Graphics
Can we have support for nine slice drawing with both stretch and tile modes?
graphics.DrawImageSliced(image, srcRect, destRect, patchRect, unitType, bool tileX, bool tileY)
I currently have this but it's broken.
maybe a implimenting a TextureBrush with tiled mode would make implementing this easier