Browse Source

Minor graphical bug fixes (arrow style, label positions)

abertout 9 years ago
parent
commit
d4dca890d5
1 changed files with 15 additions and 16 deletions
  1. 15
    16
      rtsched.sty

+ 15
- 16
rtsched.sty View File

51
 \def\RTDefLineWidth{1pt}
51
 \def\RTDefLineWidth{1pt}
52
 \def\RTDefLineStyle{solid}
52
 \def\RTDefLineStyle{solid}
53
 \def\RTDefExecHeight{1}
53
 \def\RTDefExecHeight{1}
54
-\def\RTArrowStyle{-stealth} %arrow style for deadlines, arrivals and horizontal axes
54
+\def\RTArrowStyle{stealth} %arrow style for deadlines, arrivals and horizontal axes
55
 % -{Triangle 45}[length=x] with length is a more modern arrow style but requires arrows.meta tikz library (available on latest texlive but rarely up to date on linux distribution)
55
 % -{Triangle 45}[length=x] with length is a more modern arrow style but requires arrows.meta tikz library (available on latest texlive but rarely up to date on linux distribution)
56
 %-stealth is a predefined more classical arrow style
56
 %-stealth is a predefined more classical arrow style
57
 
57
 
184
     \if\RTAxisInvisible\RTDefAxisInvisible
184
     \if\RTAxisInvisible\RTDefAxisInvisible
185
       \begin{pgfonlayer}{foreground} 
185
       \begin{pgfonlayer}{foreground} 
186
       \foreach \i [evaluate = \i as \j using (\hy -3*\i*\sy)] in {0,...,\ntaskslessone}{
186
       \foreach \i [evaluate = \i as \j using (\hy -3*\i*\sy)] in {0,...,\ntaskslessone}{
187
-      \draw [very thick,\RTArrowStyle] (\sx,\j-3*\sy) -- (\RTWindowLength - \sx,\j-3*\sy);
187
+      \draw [very thick,-\RTArrowStyle] (\sx,\j-3*\sy) -- (\RTWindowLength - \sx,\j-3*\sy);
188
       }
188
       }
189
       \end{pgfonlayer} 
189
       \end{pgfonlayer} 
190
     \fi 
190
     \fi 
251
     \@compute@yy{#2}
251
     \@compute@yy{#2}
252
     \@compute@xx{0}
252
     \@compute@xx{0}
253
     \xxx = \RTWindowLength \advance \xxx by -\sx 
253
     \xxx = \RTWindowLength \advance \xxx by -\sx 
254
-    \draw [\RTLineColor,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
255
-    \psline[linecolor=\RTLineColor]{->}(\xx,\yy)(\xxx,\yy)%
254
+    \draw [\RTLineColor,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
256
     \@RTExecDefaultValues%
255
     \@RTExecDefaultValues%
257
 }
256
 }
258
 
257
 
261
     \@compute@yy{#2}
260
     \@compute@yy{#2}
262
     \@compute@xx{0}
261
     \@compute@xx{0}
263
     \xxx = \RTWindowLength \advance \xxx by -\sx 
262
     \xxx = \RTWindowLength \advance \xxx by -\sx 
264
-    \draw [\RTLineColor,\RTArrowStyle] (\xx,\yy) -- (\xxx,\yy);
263
+    \draw [\RTLineColor,-\RTArrowStyle] (\xx,\yy) -- (\xxx,\yy);
265
     \yyy = 3\sy \multiply \yyy by #3 \advance \yyy by \yy
264
     \yyy = 3\sy \multiply \yyy by #3 \advance \yyy by \yy
266
     \advance \yyy by -\sy
265
     \advance \yyy by -\sy
267
-    \draw [\RTLineColor,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
266
+    \draw [\RTLineColor,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
268
     \@RTExecDefaultValues%
267
     \@RTExecDefaultValues%
269
 }
268
 }
270
 
269
 
287
     \@compute@xx{#3}
286
     \@compute@xx{#3}
288
     \yyy = \yy \advance \yyy by 2\sy%
287
     \yyy = \yy \advance \yyy by 2\sy%
289
      \begin{pgfonlayer}{foreground} 
288
      \begin{pgfonlayer}{foreground} 
290
-    \draw [\RTLineColor, thick,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
289
+    \draw [\RTLineColor, thick,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
291
      \end{pgfonlayer}
290
      \end{pgfonlayer}
292
 
291
 
293
     \@RTExecDefaultValues%
292
     \@RTExecDefaultValues%
303
   \@compute@xx{#3}
302
   \@compute@xx{#3}
304
   \yyy = \yy \advance \yyy by 2\sy
303
   \yyy = \yy \advance \yyy by 2\sy
305
   \begin{pgfonlayer}{foreground} 
304
   \begin{pgfonlayer}{foreground} 
306
-  \draw [\RTLineColor, thick,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
305
+  \draw [\RTLineColor, thick,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
307
   \end{pgfonlayer}
306
   \end{pgfonlayer}
308
   \advance \xx by #4\sx
307
   \advance \xx by #4\sx
309
   \begin{pgfonlayer}{foreground} 
308
   \begin{pgfonlayer}{foreground} 
310
-  \draw [\RTLineColor, thick,\RTArrowStyle] (\xx,\yyy) -- (\xx,\yy);
309
+  \draw [\RTLineColor, thick, -\RTArrowStyle] (\xx,\yyy) -- (\xx,\yy);
311
   \end{pgfonlayer}
310
   \end{pgfonlayer}
312
   \@RTExecDefaultValues
311
   \@RTExecDefaultValues
313
 }
312
 }
322
   \@compute@xx{#3}
321
   \@compute@xx{#3}
323
   \yyy = \yy \advance \yyy by 2\sy
322
   \yyy = \yy \advance \yyy by 2\sy
324
   \begin{pgfonlayer}{foreground} 
323
   \begin{pgfonlayer}{foreground} 
325
-  \draw [\RTLineColor, thick,<-] (\xx,\yy) -- (\xx,\yyy);
324
+  \draw [\RTLineColor, thick, \RTArrowStyle-] (\xx,\yy) -- (\xx,\yyy);
326
   \end{pgfonlayer}
325
   \end{pgfonlayer}
327
   \@RTExecDefaultValues
326
   \@RTExecDefaultValues
328
 }
327
 }
333
   \@compute@xx{#3}
332
   \@compute@xx{#3}
334
   \yyy = \yy \advance \yyy by \RTExecHeight\sy
333
   \yyy = \yy \advance \yyy by \RTExecHeight\sy
335
   \@compute@xxx{#4}
334
   \@compute@xxx{#4}
336
- \draw [fill=\RTTaskColor,\RTTaskFill,draw=\RTLineColor, thick] (\xx,\yy) rectangle (\xxx,\yyy);
335
+  \draw [fill=\RTTaskColor,\RTTaskFill,draw=\RTLineColor, thick] (\xx,\yy) rectangle (\xxx,\yyy);
337
   \advance \xx by \xxx \xx = .5\xx
336
   \advance \xx by \xxx \xx = .5\xx
338
- \draw (\xx,\yy) node[above, font=\rtfont] {\RTNumberLabelSize \RTExecLabel};%\RTNumberLabelSize
337
+  \advance \yy by .5\RTExecHeight\sy
338
+  \draw (\xx,\yy) node[font=\rtfont] {\RTNumberLabelSize \RTExecLabel};%\RTNumberLabelSize
339
   \@RTExecDefaultValues
339
   \@RTExecDefaultValues
340
 }
340
 }
341
 %
341
 %
396
   \yyy = -3\sy \multiply \yyy by #3 \advance \yyy by \sy
396
   \yyy = -3\sy \multiply \yyy by #3 \advance \yyy by \sy
397
   \advance \yyy by \hy \advance \yyy by -\sy % \RTWindowHeight
397
   \advance \yyy by \hy \advance \yyy by -\sy % \RTWindowHeight
398
   \begin{pgfonlayer}{foreground} 
398
   \begin{pgfonlayer}{foreground} 
399
-  \draw [dashed, thick,\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
399
+  \draw [dashed, thick,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
400
   \end{pgfonlayer}
400
   \end{pgfonlayer}
401
   \@RTExecDefaultValues
401
   \@RTExecDefaultValues
402
 }
402
 }
416
   \advance \yyy by \hy %\advance \yyy by -\sy %\RTWindowHeight
416
   \advance \yyy by \hy %\advance \yyy by -\sy %\RTWindowHeight
417
   \xxx = #5\sx \advance \xxx by \sx
417
   \xxx = #5\sx \advance \xxx by \sx
418
    \begin{pgfonlayer}{foreground} 
418
    \begin{pgfonlayer}{foreground} 
419
-  \draw [dashed, thick,\RTArrowStyle] (\xx,\yy) -- (\xxx,\yyy);
419
+  \draw [dashed, thick,-\RTArrowStyle] (\xx,\yy) -- (\xxx,\yyy);
420
    \end{pgfonlayer}
420
    \end{pgfonlayer}
421
 
421
 
422
 }
422
 }
465
 \newcommand{\RowLabel}[3][nocommand=1]{
465
 \newcommand{\RowLabel}[3][nocommand=1]{
466
   \setkeys{RT}{#1}%
466
   \setkeys{RT}{#1}%
467
   \@compute@yy{#2}
467
   \@compute@yy{#2}
468
-  \advance \yy by 1.5\sy
468
+  \advance \yy by 2\sy
469
   \xx = \RTRowLabelOffset %\advance \xx by \sx
469
   \xx = \RTRowLabelOffset %\advance \xx by \sx
470
   \node[below left,font=\rtfont] at (-\xx , \yy) {\RTTaskLabelSize #3};%\RTTaskLabelSize
470
   \node[below left,font=\rtfont] at (-\xx , \yy) {\RTTaskLabelSize #3};%\RTTaskLabelSize
471
 }
471
 }
506
   \@RTExecDefaultValues
506
   \@RTExecDefaultValues
507
 }
507
 }
508
 
508
 
509
-
510
 \@ifclassloaded{beamer}{
509
 \@ifclassloaded{beamer}{
511
   \renewcommand<>{\TaskArrival}[3][nocommand=1]{
510
   \renewcommand<>{\TaskArrival}[3][nocommand=1]{
512
     \only#4{\beameroriginal{\TaskArrival}[#1]{#2}{#3}}
511
     \only#4{\beameroriginal{\TaskArrival}[#1]{#2}{#3}}

Loading…
Cancel
Save