From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs-29 dc78779c0c: Fix SVG scaling (bug#59802) Date: Sat, 17 Dec 2022 10:25:47 +0200 Message-ID: <83cz8iighg.fsf@gnu.org> References: <167120580083.8436.12355011753442988358@vcs2.savannah.gnu.org> <20221216155001.8BDCAC0060F@vcs2.savannah.gnu.org> <87tu1ug6rz.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25544"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, manuel@ledu-giraud.fr To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 17 09:26:31 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p6SWc-0006Rk-G5 for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Dec 2022 09:26:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6SVt-0005gG-8h; Sat, 17 Dec 2022 03:25:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6SVr-0005fr-MI for emacs-devel@gnu.org; Sat, 17 Dec 2022 03:25:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6SVq-0008AI-RF; Sat, 17 Dec 2022 03:25:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=o1YQjDzxzUbVeYah8FDqP77zZ7xKFq77beEptHNPA8c=; b=QTmqvpzU441Q 7jcb+ZWuTEhQBzibFmytjPOwoEzPm3bWRIH1MT99/5F6zfaghYvTqbwnL/EEOOA4DbXsJLuzPWP0e THdL2MBGPbNx/unlCbcY5Ltvuf/LDjSuNydGyRlChsf1hG9Aq3rn82WPN5+hTHR8b2RAwYItgdEOJ RYj6CDmjeo7OONElmd4dUHu3VneBeHJnryAaMzAy3S9PgEdR2rNRlThUA1GgKNeNMP4RPC73MJblQ qLfchSsfCY+ePF/oUeAD322y41ymG82sUU8ggLfM0RP+ZxIpy55GCiH5R8hcWnWQuXp2jTvcYpfbK B6SjooyaWuLDaF976rifXw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6SVq-0006H7-74; Sat, 17 Dec 2022 03:25:42 -0500 In-Reply-To: <87tu1ug6rz.fsf@yahoo.com> (message from Po Lu on Sat, 17 Dec 2022 09:26:08 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301548 Archived-At: > From: Po Lu > Cc: Manuel Giraud > Date: Sat, 17 Dec 2022 09:26:08 +0800 > > Eli Zaretskii writes: > > > + if (! (0 < viewbox_width) && (iwidth.unit == RSVG_UNIT_PERCENT)) > > + viewbox_width = (viewbox_height * viewbox.width / viewbox.height) > > + * iwidth.length; > > + else if (! (0 < viewbox_height) && (iheight.unit == RSVG_UNIT_PERCENT)) > > + viewbox_height = (viewbox_width * viewbox.height / viewbox.width) > > + * iheight.length; > > Our style is to write: > > viewbox_width = ((viewbox_height * viewbox.width / viewbox.height) > * iwidth.length); > > and not: > > viewbox_width = (viewbox_height * viewbox.width / viewbox.height) > * iwidth.length; There's nothing wrong with the original style, although I agree that using extra parentheses makes it more plausible. There's no reason to be so stringent in insisting on the other style.