<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:8pt; font-weight:400; font-style:normal;">> > Or maybe after transformation to crtc coordinates, crtc->y is unnecesary?<br>
> We need someone that knows what crtc->y is used for to comment.<br>
> Then fixing the code to match will be simple.<br>
> <br>
> Barry<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>I've updated my odg drawing. I'm thinking this should be good approach:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>box_in_crtc_coordinates = *box;<br>
if (crtc->transform_in_use)<br>
pixman_f_transform_bounds (&crtc->f_framebuffer_to_crtc, &box_in_crtc_coordinates);<br>
y1 = (box_in_crtc_coordinates.y1 <= 0) ? 0 : box_in_crtc_coordinates.y1;<br>
y2 = (box_in_crtc_coordinates.y2 <= crtc_last_scanline) ? box_in_crtc_coordinates.y2 : crtc_last_scanline;<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>My assumption here is that after transformation to crtc space all coordinates of the box are relative to "upper left" corner of given crtc (if rotated 180 than it's lower right corner, etc.) anyway relative to first scanline. <br>
With this assumption box_in_crtc_coordinates.y1 can be negative. All thats left is that we need to now how many scanlines crt has. In normal case thats crtcbox.y2 - crtcbox.y1. <br>
But when rotation is added we need to calculate that in other way. Or maybe that information is available somewhere without calculation?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>