The R Project SVN R

Rev

Rev 42307 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 42307 Rev 42633
Line 2845... Line 2845...
2845
    return bbox;
2845
    return bbox;
2846
}
2846
}
2847
 
2847
 
2848
/*----------------------------------------------------------------------
2848
/*----------------------------------------------------------------------
2849
 *
2849
 *
-
 
2850
 *  Code for SymbolFace (i.e. font = 5) Expressions
-
 
2851
 *
-
 
2852
 *  This makes the default font an Adobe Symbol Encoded font
-
 
2853
 *  (provides access to any character in the Adobe Symbol Font
-
 
2854
 *   encoding via strings like "\042" for the universal ["for all"]
-
 
2855
 *   symbol, without the need for separate special names for each
-
 
2856
 *   of these symbols).
-
 
2857
 *
-
 
2858
 */
-
 
2859
 
-
 
2860
static int SymbolFaceAtom(SEXP expr)
-
 
2861
{
-
 
2862
    return NameAtom(expr) &&
-
 
2863
	NameMatch(expr, "symbol");
-
 
2864
}
-
 
2865
 
-
 
2866
static BBOX RenderSymbolFace(SEXP expr, int draw, mathContext *mc,
-
 
2867
                             R_GE_gcontext *gc, GEDevDesc *dd)
-
 
2868
{
-
 
2869
    BBOX bbox;
-
 
2870
    int prevfont = SetFont(SymbolFont, gc);
-
 
2871
    bbox = RenderElement(CADR(expr), draw, mc, gc, dd);
-
 
2872
    SetFont(prevfont, gc);
-
 
2873
    return bbox;
-
 
2874
}
-
 
2875
 
-
 
2876
/*----------------------------------------------------------------------
-
 
2877
 *
2850
 *  Code for Bold Italic Expressions
2878
 *  Code for Bold Italic Expressions
2851
 *
2879
 *
2852
 */
2880
 */
2853
 
2881
 
2854
static int BoldItalicAtom(SEXP expr)
2882
static int BoldItalicAtom(SEXP expr)
Line 3085... Line 3113...
3085
	return RenderBold(expr, draw, mc, gc, dd);
3113
	return RenderBold(expr, draw, mc, gc, dd);
3086
    else if (ItalicAtom(head))
3114
    else if (ItalicAtom(head))
3087
	return RenderItalic(expr, draw, mc, gc, dd);
3115
	return RenderItalic(expr, draw, mc, gc, dd);
3088
    else if (PlainAtom(head))
3116
    else if (PlainAtom(head))
3089
	return RenderPlain(expr, draw, mc, gc, dd);
3117
	return RenderPlain(expr, draw, mc, gc, dd);
-
 
3118
    else if (SymbolFaceAtom(head))
-
 
3119
	return RenderSymbolFace(expr, draw, mc, gc, dd);
3090
    else if (BoldItalicAtom(head))
3120
    else if (BoldItalicAtom(head))
3091
	return RenderBoldItalic(expr, draw, mc, gc, dd);
3121
	return RenderBoldItalic(expr, draw, mc, gc, dd);
3092
    else if (StyleAtom(head))
3122
    else if (StyleAtom(head))
3093
	return RenderStyle(expr, draw, mc, gc, dd);
3123
	return RenderStyle(expr, draw, mc, gc, dd);
3094
    else if (PhantomAtom(head))
3124
    else if (PhantomAtom(head))