[NECTO Studio 2.1.0] gl_set_crop_borders doesn't work [solved]
Posted: 16 Sep 2022 10:57
Hello,
made a small project on mikromedia 3 with PIC32MZ to test the gl_set_crop_borders function.
However, this doesn't work. Project attached.
The code contains the commands to draw three rectangles, however, only one, the first one, should be
drawn completely. The second should be cropped and the third rectangle shouldn't be drawn at all.
In reality, all three rectangles are visible on the display.
made a small project on mikromedia 3 with PIC32MZ to test the gl_set_crop_borders function.
However, this doesn't work. Project attached.
Code: Select all
// Specify area on display for drawing.
err_ret = gl_set_crop_borders(-1, -1, -1, -1); // Set hole display enabled because the area is invalid
gl_draw_rect(50,50, 50, 50); // Hole rect is visible
// Specify area on display for drawing
err_ret = gl_set_crop_borders(-5,-3, 75, 75); // Set borders for drawing on y=75 and x = 75 at right and bottom, while top and right borders are corrected to zeros.
gl_draw_rect(65, 65, 50,50); // Part of rect is cropped, and display has only rect between 50,50,75, 75
// Specify area on display for drawing
err_ret = gl_set_crop_borders(250,250, 300, 300); // Set borders for drawing between coordinates y=250 and y=300, x=250 and x=300
gl_draw_rect(40, 40, 50,50); // Since rectangle does not appears in previously specified area, hole rect is not visible.
drawn completely. The second should be cropped and the third rectangle shouldn't be drawn at all.
In reality, all three rectangles are visible on the display.