pspp-dev
[Top][All Lists]
Advanced

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

Re: Options to cairo driver


From: John Darrington
Subject: Re: Options to cairo driver
Date: Tue, 20 Dec 2011 08:02:08 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Dec 19, 2011 at 09:33:30PM -0800, Ben Pfaff wrote:
     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?

You are right.  If the font size is increased too much, then the GtkDrawingArea
is not large enough to hold the text.

J'
     
     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

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

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