hi bruce, this is a boxed u:label basically it gets the string as picture, its bounding box corners, and define the x and y to draw the box, then draw the string picture point 10 20 u:label -attr val 20 def p_u_label ( expr p,r,s,t ) = picture pic; pic := thelabel( ATTR_val, (0,0)) scaled s; pair q[]; numeric n[], m[], v; path bb; v := defaultscale; qO = ulcorner pic; q1 = lrcorner pic; nO := ypart q0 + 2.5 * v; n1 := ypart q1 - 1.5*v; m0 := xpart q0 - v; m1 := xpart q1 + 1.5*v; bb := (m0,n0) -- (m0,n1) -- (m1,n1) -- (m1,n0) -- cycle; draw bb rotated r shifted p; draw pic rotated r shifted p; enddef
Marco, you are right. But the discussion is that Missouri mappers use number in box as point height. So by my meaning correct way should be to define new symbol set which will generate point height in sguare label. User definition is temporary solution in this case. Martin S.
24. 9. 2018 v 11:16, Marco Corvi via Therion <therion@speleo.sk>:
hi bruce,
this is a boxed u:label basically it gets the string as picture, its bounding box corners, and define the x and y to draw the box, then draw the string picture
point 10 20 u:label -attr val 20
def p_u_label ( expr p,r,s,t ) = picture pic; pic := thelabel( ATTR_val, (0,0)) scaled s; pair q[]; numeric n[], m[], v; path bb; v := defaultscale; qO = ulcorner pic; q1 = lrcorner pic; nO := ypart q0 + 2.5 * v; n1 := ypart q1 - 1.5*v; m0 := xpart q0 - v; m1 := xpart q1 + 1.5*v; bb := (m0,n0) -- (m0,n1) -- (m1,n1) -- (m1,n0) -- cycle; draw bb rotated r shifted p; draw pic rotated r shifted p; enddef
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Thanks Marco Eventually the squeaky wheel gets oiled :) Looks like it should work, but it seems to complain about setting the parsed attribute to a picture. I will look some more when I have time tonight.. **data.mp (./data.mp [4001] [4002] [4003] [4004] [4005] [4006] [4007] [4008] [4009] [4010 ] [4011] [4012] [4013] [4014] [4015] [4016] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]
unknown picture pic
thelabelboxed
! Equation cannot be performed (unknown picture=numeric). <to be read again> Bruce From: Therion <therion-bounces@speleo.sk> On Behalf Of Marco Corvi via Therion Sent: Monday, 24 September 2018 21:16 To: therion@speleo.sk Cc: Marco Corvi <marco.corvi@gmail.com> Subject: [Therion] boxed label hi bruce, this is a boxed u:label basically it gets the string as picture, its bounding box corners, and define the x and y to draw the box, then draw the string picture point 10 20 u:label -attr val 20 def p_u_label ( expr p,r,s,t ) = picture pic; pic := thelabel( ATTR_val, (0,0)) scaled s; pair q[]; numeric n[], m[], v; path bb; v := defaultscale; qO = ulcorner pic; q1 = lrcorner pic; nO := ypart q0 + 2.5 * v; n1 := ypart q1 - 1.5*v; m0 := xpart q0 - v; m1 := xpart q1 + 1.5*v; bb := (m0,n0) -- (m0,n1) -- (m1,n1) -- (m1,n0) -- cycle; draw bb rotated r shifted p; draw pic rotated r shifted p; enddef;
Hello, i currently try to make the little points in an "intermittent waterflow" more visible on clay background. For this i tried to make the points bigger and added to my layout section: ---------------- layout hvho_basic.layout # more irrelevant stuff here... symbol-set AUT # Thicker lines for water flow in default symbol; note that AUT does not define l_waterflow_conjectural code metapost def l_waterflow_conjectural_SKBB (expr Path) = %thdrawoptions(dashed withdots scaled (0.9 * optical_zoom) withpen PenB); l_waterflow_permanent_UIS (Path); %thdrawoptions(); enddef; endcode # more irrelevant stuff here ---------------- However, this does yield nothing. I even (see above example) removed the thdraw commands so it should print a straight line, but it still is pointy. Whateer i do, i cannot bring this to work. What am i overlooking here? With best regards, Beni
Sorry, i want to override the "conjectural" type, not the intermittent... Am 2018-09-24 23:04, schrieb Benedikt Hallinger:
Hello, i currently try to make the little points in an "intermittent waterflow" more visible on clay background.
For this i tried to make the points bigger and added to my layout section: ---------------- layout hvho_basic.layout # more irrelevant stuff here... symbol-set AUT
# Thicker lines for water flow in default symbol; note that AUT does not define l_waterflow_conjectural code metapost def l_waterflow_conjectural_SKBB (expr Path) = %thdrawoptions(dashed withdots scaled (0.9 * optical_zoom) withpen PenB); l_waterflow_permanent_UIS (Path); %thdrawoptions(); enddef; endcode
# more irrelevant stuff here ----------------
However, this does yield nothing. I even (see above example) removed the thdraw commands so it should print a straight line, but it still is pointy. Whateer i do, i cannot bring this to work. What am i overlooking here?
With best regards, Beni
Ok, well, i found it shortly after my mail. it works when i give def l_waterflow_conjectural (expr Path) = instead of def l_waterflow_conjectural_SKBB (expr Path) = sorry for any inconvinience... Am 2018-09-24 23:06, schrieb Benedikt Hallinger:
Sorry, i want to override the "conjectural" type, not the intermittent...
Am 2018-09-24 23:04, schrieb Benedikt Hallinger:
Hello, i currently try to make the little points in an "intermittent waterflow" more visible on clay background.
For this i tried to make the points bigger and added to my layout section: ---------------- layout hvho_basic.layout # more irrelevant stuff here... symbol-set AUT
# Thicker lines for water flow in default symbol; note that AUT does not define l_waterflow_conjectural code metapost def l_waterflow_conjectural_SKBB (expr Path) = %thdrawoptions(dashed withdots scaled (0.9 * optical_zoom) withpen PenB); l_waterflow_permanent_UIS (Path); %thdrawoptions(); enddef; endcode
# more irrelevant stuff here ----------------
However, this does yield nothing. I even (see above example) removed the thdraw commands so it should print a straight line, but it still is pointy. Whateer i do, i cannot bring this to work. What am i overlooking here?
With best regards, Beni
File thTrans.mp, line 103: let l_waterflow_conjectural = l_waterflow_conjectural_SKBB; It means the name of valid symbol is l_waterflow_conjectural and it is identical with l_waterflow_conjectural_SKBB So you should change definition of valid symbol. Martin S.
24. 9. 2018 v 23:09, Benedikt Hallinger via Therion <therion@speleo.sk>:
Ok, well, i found it shortly after my mail. it works when i give def l_waterflow_conjectural (expr Path) = instead of def l_waterflow_conjectural_SKBB (expr Path) =
sorry for any inconvinience...
Am 2018-09-24 23:06, schrieb Benedikt Hallinger:
Sorry, i want to override the "conjectural" type, not the intermittent... Am 2018-09-24 23:04, schrieb Benedikt Hallinger:
Hello, i currently try to make the little points in an "intermittent waterflow" more visible on clay background. For this i tried to make the points bigger and added to my layout section: ---------------- layout hvho_basic.layout # more irrelevant stuff here... symbol-set AUT # Thicker lines for water flow in default symbol; note that AUT does not define l_waterflow_conjectural code metapost def l_waterflow_conjectural_SKBB (expr Path) = %thdrawoptions(dashed withdots scaled (0.9 * optical_zoom) withpen PenB); l_waterflow_permanent_UIS (Path); %thdrawoptions(); enddef; endcode # more irrelevant stuff here ---------------- However, this does yield nothing. I even (see above example) removed the thdraw commands so it should print a straight line, but it still is pointy. Whateer i do, i cannot bring this to work. What am i overlooking here? With best regards, Beni
Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
participants (5)
-
Benedikt Hallinger -
Bruce Mutton -
Marco Corvi -
Martin Sluka -
Martin Sluka