Browse Source

Added the possibility to specify the height of an execution rectangle.

Giuseppe Lipari 11 years ago
parent
commit
bf520d7245
2 changed files with 8 additions and 5 deletions
  1. 2
    2
      rtsched-doc.tex
  2. 6
    3
      rtsched.sty

+ 2
- 2
rtsched-doc.tex View File

514
       \TaskArrival{1}{\n}
514
       \TaskArrival{1}{\n}
515
       \TaskExecDelta{1}{\n}{2}}
515
       \TaskExecDelta{1}{\n}{2}}
516
     \TaskArrival{2}{10}
516
     \TaskArrival{2}{10}
517
-    \TaskExecDelta{2}{10}{3}
517
+    \TaskExecDelta[exeheight=1.5]{2}{10}{3}
518
     \Activation{1}{8}{2}{10}
518
     \Activation{1}{8}{2}{10}
519
     \Label{6}{7}{$\delta$}
519
     \Label{6}{7}{$\delta$}
520
   \end{RTGrid}
520
   \end{RTGrid}
525
       \TaskArrival{1}{\n}
525
       \TaskArrival{1}{\n}
526
       \TaskExecDelta{1}{\n}{2}}
526
       \TaskExecDelta{1}{\n}{2}}
527
     \TaskArrival{2}{10}
527
     \TaskArrival{2}{10}
528
-    \TaskExecDelta{2}{10}{3}
528
+    \TaskExecDelta[exeheight=1.5]{2}{10}{3}
529
     \Activation{1}{8}{2}{10}
529
     \Activation{1}{8}{2}{10}
530
     \Label{6}{7}{$\delta$}
530
     \Label{6}{7}{$\delta$}
531
   \end{RTGrid}
531
   \end{RTGrid}

+ 6
- 3
rtsched.sty View File

3
 \typeout{'rtsched' style for Latex and PSTricks}
3
 \typeout{'rtsched' style for Latex and PSTricks}
4
 \typeout{Easily draw real-time schedules in TeX/Latex.}
4
 \typeout{Easily draw real-time schedules in TeX/Latex.}
5
 \typeout{(c) 2005, Giuseppe Lipari, Pisa, Italy (g.lipari@sssup.it)}
5
 \typeout{(c) 2005, Giuseppe Lipari, Pisa, Italy (g.lipari@sssup.it)}
6
-\typeout{Version 1.1}
6
+\typeout{Version 1.2beta}
7
 
7
 
8
 \RequirePackage{multido}
8
 \RequirePackage{multido}
9
 \RequirePackage{pstricks}
9
 \RequirePackage{pstricks}
30
 \def\RTDefAxisInvisible{0}
30
 \def\RTDefAxisInvisible{0}
31
 \def\RTDefLineWidth{1pt}
31
 \def\RTDefLineWidth{1pt}
32
 \def\RTDefLineStyle{solid}
32
 \def\RTDefLineStyle{solid}
33
+\def\RTDefExecHeight{1}
33
 
34
 
34
 \def\RTExecLabel{\ }
35
 \def\RTExecLabel{\ }
35
 \def\RTTaskSymbol{\RTDefTaskSymbol}
36
 \def\RTTaskSymbol{\RTDefTaskSymbol}
46
 \def\RTRowLabelOffset{\RTDefRowLabelOffset}
47
 \def\RTRowLabelOffset{\RTDefRowLabelOffset}
47
 \def\RTLineWidth{\RTDefLineWidth}
48
 \def\RTLineWidth{\RTDefLineWidth}
48
 \def\RTLineStyle{\RTDefLineStyle}
49
 \def\RTLineStyle{\RTDefLineStyle}
50
+\def\RTExecHeight{\RTDefExecHeight}
49
 
51
 
50
 \define@key{RT}{height}[\RTNullWindowHeight]{\def\RTWindowHeight{#1}}
52
 \define@key{RT}{height}[\RTNullWindowHeight]{\def\RTWindowHeight{#1}}
51
 \define@key{RT}{width}[10cm]{\def\RTWindowLength{#1}}
53
 \define@key{RT}{width}[10cm]{\def\RTWindowLength{#1}}
66
 \define@key{RT}{axis}[\RTDefAxisInvisible]{\def\RTAxisInvisible{#1}}
68
 \define@key{RT}{axis}[\RTDefAxisInvisible]{\def\RTAxisInvisible{#1}}
67
 \define@key{RT}{lw}[\RTDefLineWidth]{\def\RTLineWidth{#1}}
69
 \define@key{RT}{lw}[\RTDefLineWidth]{\def\RTLineWidth{#1}}
68
 \define@key{RT}{style}[\RTDefLineStyle]{\def\RTLineStyle{#1}}
70
 \define@key{RT}{style}[\RTDefLineStyle]{\def\RTLineStyle{#1}}
71
+\define@key{RT}{exeheight}[\RTDefExecHeight]{\def\RTExecHeight{#1}}
69
 
72
 
70
 %%
73
 %%
71
 %% temporaries
74
 %% temporaries
293
   \setkeys{RT}{#1}%
296
   \setkeys{RT}{#1}%
294
   \@compute@yy{#2}
297
   \@compute@yy{#2}
295
   \@compute@xx{#3}
298
   \@compute@xx{#3}
296
-  \yyy = \yy \advance \yyy by \sy
299
+  \yyy = \yy \advance \yyy by \RTExecHeight\sy
297
   \@compute@xxx{#4}
300
   \@compute@xxx{#4}
298
   \psframe[fillstyle=\RTTaskFill,fillcolor=\RTTaskColor,linecolor=\RTLineColor](\xx,\yy)(\xxx,\yyy)
301
   \psframe[fillstyle=\RTTaskFill,fillcolor=\RTTaskColor,linecolor=\RTLineColor](\xx,\yy)(\xxx,\yyy)
299
   \advance \xx by \xxx \xx = .5\xx
302
   \advance \xx by \xxx \xx = .5\xx
440
   \setkeys{RT}{#1}%
443
   \setkeys{RT}{#1}%
441
   \@compute@yy{#2}
444
   \@compute@yy{#2}
442
   \@compute@xx{#3}
445
   \@compute@xx{#3}
443
-  \yyy = \yy \advance \yyy by \sy
446
+  \yyy = \yy \advance \yyy by \RTExecHeight\sy
444
   %\@compute@xxx{#4}
447
   %\@compute@xxx{#4}
445
   \xxx = \xx \advance \xxx by #4\sx
448
   \xxx = \xx \advance \xxx by #4\sx
446
   \psframe[fillstyle=\RTTaskFill,fillcolor=\RTTaskColor,linecolor=\RTLineColor](\xx,\yy)(\xxx,\yyy)
449
   \psframe[fillstyle=\RTTaskFill,fillcolor=\RTTaskColor,linecolor=\RTLineColor](\xx,\yy)(\xxx,\yyy)

Loading…
Cancel
Save