Is it possible to define new graphics directives?
For example, suppose I want to be able to use the following code:
Graphics[{ BigPointSize[0.07], SmallPointSize[0.04],
Red, BigPoint[{1,1}], BigPoint[{1,3}], SmallPoint[{3,1}],
Blue, SmallPoint[{2,2}], SmallPoint[{3,2}], BigPoint[{0,0}]
}]
Is there any way to define BigPointSize
, SmallPointSize
, BigPoint
, and SmallPoint
so that this code will work as intended? Ideally BigPointSize
and SmallPointSize
should have all of the functionality of other graphics directives, e.g. scoping inside of lists, and the ability to call the command multiple times within the same list.
(Obviously it's possible to draw these points in other ways, but I'm curious whether it's possible to get this syntax to work.)
Edit: Just to clarify, I would like BigPointSize
and SmallPointSize
to work the same way as PointSize and other graphics directives. For example, the code
Graphics[{ BigPointSize[0.1],
{ BigPointSize[0.05], BigPoint[{0,0}] },
BigPoint[{1,0}]
}]
should produce one point of size 0.05
and one point of size 0.1
.