I have a question:
When using a makeContent method for a grob class we define, is it a must to use a makeContext method for it as well?
For reference, I'm working on refactoring the directlabels codebase which currently uses a drawDetails method on a grob class named dlgrob, but it doesn't use a preDrawDetails and a corresponding postDrawDetails method.
Also, the sole purpose of using makeContent (instead of drawDetails) here is to make use of grid.force. It's one of my objectives as stated here, and this plan (3rd point) is what I'll be going ahead with.
In the current setup, drawDetails.dlgrob is called with the current ggplot/lattice panel as the current viewport. This is required in order to compute text size correctly via grid functions convertX/convertY. So I would like to know, will the current viewport be taken as the current panel while using makeContent as well? (then I suppose we don't have to use makeContext?)
Hi @pmur002
I have a question: When using a
makeContent
method for a grob class we define, is it a must to use amakeContext
method for it as well?For reference, I'm working on refactoring the directlabels codebase which currently uses a
drawDetails
method on a grob class nameddlgrob
, but it doesn't use apreDrawDetails
and a correspondingpostDrawDetails
method. Also, the sole purpose of usingmakeContent
(instead ofdrawDetails
) here is to make use ofgrid.force
. It's one of my objectives as stated here, and this plan (3rd point) is what I'll be going ahead with.In the current setup,
drawDetails.dlgrob
is called with the current ggplot/lattice panel as the current viewport. This is required in order to compute text size correctly via grid functionsconvertX
/convertY
. So I would like to know, will the current viewport be taken as the current panel while usingmakeContent
as well? (then I suppose we don't have to usemakeContext
?)