X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Message-ID: <51C06B1F.8000601@sonic.net> Date: Tue, 18 Jun 2013 07:13:51 -0700 From: Dave Curtis User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: geda-user AT delorie DOT com Subject: Re: [geda-user] gschem text measure References: <51BE355E DOT 5040600 AT sonic DOT net> <51BE73B7 DOT 4020905 AT sonic DOT net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: geda-user AT delorie DOT com OK, that really isn't my question, though. I want to mimic gschem's computations, broken or not, closely enough that my tool can lay out symbol text with reasonable accuracy. -dave On 06/18/2013 03:17 AM, Roland Lutz wrote: > Hi, > > In my opinion, the way text measurements are handled in gEDA is > somewhat broken. The bounding box of an object is usually retrieved > via world_get_single_object_bounds. This, however, depends on the > TOPLEVEL context because libgeda by itself is unable to tell the > bounding box of a text object, effectively asking the GUI to do so. > So there is data stored in the OBJECT struct which actually belongs to > a TOPLEVEL object, making it impossible to share objects between > contexts. > > This is a problem in the FLAG_TEXT_OUTLINE rendering mode where the > object's bounding box should be drawn but there is no TOPLEVEL context > available in the renderer, so the objects' cached (and maybe invalid) > bounding boxes are drawn instead. > > One possible solution to address this would be to add a TOPLEVEL > reference to the renderer. > > Roland >