* hlingrid text t parameter?
@ 2005-12-27 6:38 David Arnold
2005-12-27 7:29 ` Aditya Mahajan
2005-12-27 21:03 ` Hans Hagen
0 siblings, 2 replies; 4+ messages in thread
From: David Arnold @ 2005-12-27 6:38 UTC (permalink / raw)
All,
In mp-grid.mp, I find this definition:
def hlingrid (expr Min, Max, Step, Length, Width) text t =
image ( for i=Min step Step until Max+grid_eps :
draw (origin--(Width,0)) shifted (0,i*(Length/Max)) t ;
endfor ; ) ;
enddef ;
See the text t at the end of the first line? Can someone tell me what
that does and can I have a small example of its use?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: hlingrid text t parameter?
2005-12-27 6:38 hlingrid text t parameter? David Arnold
@ 2005-12-27 7:29 ` Aditya Mahajan
2005-12-27 7:46 ` David Arnold
2005-12-27 21:03 ` Hans Hagen
1 sibling, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2005-12-27 7:29 UTC (permalink / raw)
<--- On Dec 26, David Arnold wrote --->
> All,
>
> In mp-grid.mp, I find this definition:
>
> def hlingrid (expr Min, Max, Step, Length, Width) text t =
> image ( for i=Min step Step until Max+grid_eps :
> draw (origin--(Width,0)) shifted (0,i*(Length/Max)) t ;
> endfor ; ) ;
> enddef ;
>
> See the text t at the end of the first line? Can someone tell me what
> that does and can I have a small example of its use?
I think, (I can not test it right now), that this should allow you to
do things like
hlingrid(0,10,0.1,5cm,3cm) withcolor 0.5white ;
which will draw the line with 50% gray, and
hlingrid(0,10,0.1,5cm,3cm) dashed evenly ;
which will draw a dashed grid and so on.
Aditya
--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: hlingrid text t parameter?
2005-12-27 7:29 ` Aditya Mahajan
@ 2005-12-27 7:46 ` David Arnold
0 siblings, 0 replies; 4+ messages in thread
From: David Arnold @ 2005-12-27 7:46 UTC (permalink / raw)
Perfect! Thanks.
On Dec 26, 2005, at 11:29 PM, Aditya Mahajan wrote:
> <--- On Dec 26, David Arnold wrote --->
>
>> All,
>>
>> In mp-grid.mp, I find this definition:
>>
>> def hlingrid (expr Min, Max, Step, Length, Width) text t =
>> image ( for i=Min step Step until Max+grid_eps :
>> draw (origin--(Width,0)) shifted (0,i*(Length/Max)) t ;
>> endfor ; ) ;
>> enddef ;
>>
>> See the text t at the end of the first line? Can someone tell me
>> what that does and can I have a small example of its use?
>
> I think, (I can not test it right now), that this should allow you
> to do things like
>
> hlingrid(0,10,0.1,5cm,3cm) withcolor 0.5white ;
>
> which will draw the line with 50% gray, and
>
> hlingrid(0,10,0.1,5cm,3cm) dashed evenly ;
>
> which will draw a dashed grid and so on.
>
>
> Aditya
>
> --
> Aditya Mahajan, EECS Systems, University of Michigan
> http://www.eecs.umich.edu/~adityam || Ph: 7342624008
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: hlingrid text t parameter?
2005-12-27 6:38 hlingrid text t parameter? David Arnold
2005-12-27 7:29 ` Aditya Mahajan
@ 2005-12-27 21:03 ` Hans Hagen
1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2005-12-27 21:03 UTC (permalink / raw)
David Arnold wrote:
> All,
>
> In mp-grid.mp, I find this definition:
>
> def hlingrid (expr Min, Max, Step, Length, Width) text t =
> image ( for i=Min step Step until Max+grid_eps :
> draw (origin--(Width,0)) shifted (0,i*(Length/Max)) t ;
> endfor ; ) ;
> enddef ;
>
> See the text t at the end of the first line? Can someone tell me what
> that does and can I have a small example of its use?
t (text) is anything upto the ;
so you can use it to pass things like 'withcolor red' and so
Hans
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-12-27 21:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-27 6:38 hlingrid text t parameter? David Arnold
2005-12-27 7:29 ` Aditya Mahajan
2005-12-27 7:46 ` David Arnold
2005-12-27 21:03 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).