logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Guest  
#1 Posted : Wednesday, April 13, 2016 7:01:35 AM(UTC)
Guest

Rank: Guest

Groups: Guests
Joined: 1/5/2016(UTC)
Posts: 162

Was thanked: 5 time(s) in 5 post(s)
FS_RECTF constructor is confusing.

FS_RECTF() { left = x1, top = y1, right = x2, bottom = y2 };


float pageWidth = page.Width; // 595
float pageHeight = page.Height; // 841


float rectangleWidth = 105.0f;
float rectangleHeight = 320.0f;

float left = 10.0f; // The x-coordinate of the left - top corner.
float top = 330.0f; // The y-coordinate of the left-top corner.

float right = left + rectangleWidth; //The x-coordinate of the right-bottom corner.
float bottom = top + rectangleHeight; // The y-coordinate of the right-bottom corner.

var rect = new FS_RECTF() { left = left, top = top, right = right, bottom = bottom };

// rect has negative height! Why

Thanks in advance
Paul Rayman  
#2 Posted : Friday, April 15, 2016 4:09:45 AM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
FS_RECTF it's a PDF style rectangle.
The height value is negative because vertical coordinates in a PDF coordinate system increase from bottom to top.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.