![]() |
【转帖】gipolylinehaswidth vs. getconstantwidth
gipolyline::haswidth vs. getconstantwidth
gipolyline::haswidth vs. getconstantwidth i've found that gipolyline::haswidth returns false even if a polyline has a constant non-zero width. is it normal behavior? thanks arno歵 haswidth() returns true if vertices have individual widths. sergey slezkin hi, i've noted that for a simple rectangle made in autocad for which haswidth() returned false, getconstantwidth() returns 0, whereas the lineweight applied to the rectangle was non-zero. what does this case (haswidth() == false && getconstantwidth() == 0) signify? my current understanding is that for getting correct lineweight in plineproc() i'll have to do something like: code: if (!lwbuf.haswidth()) { if (lwbuf.getconstantwidth() == 0) { // fetch the lineweight stored in the last call to ontraitsmodified() } else { lineweight = lwbuf.getconstantwidth(); if (pxform) { lineweight * = pxform->scale(); } } } thanks, varun lineweight and polyline width are unrelated things. lineweight is common oddbentity property. any entity can have lineweight (paper line width). oddb2dpolyline and oddbpolyline can have constant width or width specified per each vertex (haswidths() = true). for example polyline with 2 vertices one of which has zero width and another - non-zero width is rendered as triangle. polyline width is in model coordinates. sergey slezkin for a rectangle, each of whose's edges have the same lineweight, why does the getconstantwidth return zero? thanks, varun lineweight and polyline's width are unrelated things. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 09:13 AM. |