pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Options to cairo driver


From: Ben Pfaff
Subject: Re: Options to cairo driver
Date: Mon, 19 Dec 2011 21:33:30 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

It looks reasonable enough to me.  I'm happy with it, as long as
existing unit tests continue to pass (presumably they do).

I expect that changes in font size require more extensive work to
make the results look reasonable?

John Darrington <address@hidden> writes:

> Here's a patch for review then.
>
> J'
>
>
> On Sun, Dec 18, 2011 at 05:04:31PM -0800, Ben Pfaff wrote:
>      Yes, that's one way to implement the approach I have in mind.
>      
>      John Darrington <address@hidden> writes:
>      
>      > I think I understand what you're saying now.
>      > You're suggesting that we add the string_map as a member of the output
>      > viewer object?   Yes I think that will work.
>      >
>      > J'
>      >
>      > On Sun, Dec 18, 2011 at 11:22:36AM -0800, Ben Pfaff wrote:
>      >      [adding pspp-dev back, assuming it was just dropped accidentally]
>      >      
>      >      John Darrington <address@hidden> writes:
>      >      
>      >      > On Sat, Dec 17, 2011 at 10:13:30AM -0800, Ben Pfaff wrote:
>      >      >
>      >      >      I don't understand the problem yet.  If we pass a 
> particular set
>      >      >      of options to a driver, then we'll get a particular
>      >      >      configuration.  If we need to change one option, then we 
> can do
>      >      >      that by updating the set of options slightly (just 
> changing the
>      >      >      one value) and then handing the driver the updated set of
>      >      >      options.  
>      >      >
>      >      > This sounds perfectly reasonable.
>      >      >
>      >      >         The default values should default the same way they did
>      >      >      on the first try, right?  
>      >      >
>      >      > This doesn't sound so good.  I don't want them to default.  I 
> want them
>      >      > to remain in their current state.
>      >      >
>      >      >
>      >      > For the current problem, I need a function, to be called in
>      >      > psppire-output-window.c (expose_event_callback) which sets the
>      >      > font and the foreground colour (perhaps a few other things too)
>      >      > but leaves the rest of the options in their current state.
>      >      > This doesn't seem possible at the moment without changing code
>      >      > in quote a lot of places or by circumventing the interface to
>      >      > the cairo xr driver.
>      >      
>      >      So let's use an example, because I still don't see the problem
>      >      yet.  Suppose the cairo driver is initially configured as:
>      >      
>      >              foreground-color: black
>      >              font: Sans
>      >              font-size: 12pt
>      >      
>      >      No background color is specified, so suppose it defaults to
>      >      white.  Now something comes along and wants to set the font size
>      >      to 10pt.  So we take the original set of options, change the
>      >      font-size to 10pt, and hand the updated set of options back to
>      >      the driver (using some new "set_options" function I guess).  The
>      >      new option set looks like this:
>      >      
>      >              foreground-color: black
>      >              font: Sans
>      >              font-size: 10pt
>      >      
>      >      No background color is specified now either, so it still defaults
>      >      to white.
>      >      
>      >      What's the problem with defaults in this scenario?
>      >      
>      >      Thanks,
>      >      
>      >      Ben.
>      >      -- 
>      >      Ben Pfaff 
>      >      http://benpfaff.org
>      
>      -- 
>      Ben Pfaff 
>      http://benpfaff.org

-- 
Ben Pfaff 
http://benpfaff.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]