Changeset 10729 for trunk/psLib/src/math/psRegion.c
- Timestamp:
- Dec 14, 2006, 9:11:17 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psRegion.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psRegion.c
r9538 r10729 81 81 psString psRegionToString(const psRegion region) 82 82 { 83 char tmpText[256]; // big enough to store any region as text83 char *result = NULL; 84 84 85 snprintf(tmpText,256,"[%g:%g,%g:%g]", 86 region.x0+1, region.x1, 87 region.y0+1, region.y1); 88 89 return psStringCopy(tmpText); 85 // [0:0,0:0] is complete image region 86 if ((region.x0 == 0) && (region.x1 == 0) && (region.y0 == 0) && (region.y1 == 0)) { 87 psStringAppend(&result, "[0:0,0:0]"); 88 } else { 89 psStringAppend(&result, "[%g:%g,%g:%g]", 90 region.x0+1, region.x1, 91 region.y0+1, region.y1); 92 } 93 return result; 90 94 } 91 92 95 93 96 // define a square region centered on the given coordinate
Note:
See TracChangeset
for help on using the changeset viewer.
