| 20 | #include "IPLCanvasSize.h" |
| 21 | |
| 22 | void IPLCanvasSize::init() |
| 23 | { |
| 24 | // init |
| 25 | _result = NULL; |
| 26 | |
| 27 | // basic settings |
| 28 | setClassName("IPLCanvasSize"); |
| 29 | setTitle("Resize Canvas"); |
| 30 | setKeywords("crop"); |
| 31 | setCategory(IPLProcess::CATEGORY_GEOMETRY); |
| 32 | |
| 33 | // inputs and outputs |
| 34 | addInput("Image", IPL_IMAGE_COLOR); |
| 35 | addOutput("Image", IPL_IMAGE_COLOR); |
| 36 | |
| 37 | // properties |
| 38 | addProcessPropertyInt("width", "Width", "", 512, IPL_WIDGET_SLIDER, 1, 4096); |
| 39 | addProcessPropertyInt("height", "Height", "", 512, IPL_WIDGET_SLIDER, 1, 4096); |
| 40 | addProcessPropertyInt("anchor", "Anchor:Top Left|Top|Top Right|Left|Center|Right|Bottom Left|Bottom|Bottom Right", "", 4, IPL_WIDGET_COMBOBOX); |
| 41 | addProcessPropertyColor("color", "Background", "If extending the canvas, the background is filled with this color", IPLColor(0,0,0), IPL_WIDGET_COLOR_RGB); |
| 42 | } |
| 43 | |
| 44 | void IPLCanvasSize::destroy() |
| 45 | { |
nothing calls this directly
no test coverage detected