X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=NR6WYgFnBQWmuheXbouwaf3FFf+DCpf3PCZaPZQXu18=; b=Y19edxGZzaYxfaBvp9avDHu3o7fZvnq0SwirX5UD0jbgxltwQPJJbM7d7PoyfQBh6e Zq8HMXC1LUjnzdK2Wx+XPC0HaKIGs1a1vT+Yjim+Uf+oVpsNJQwrM5bGOCCZg6aenSMa 6P0MdGSw5AsEc5uVO1GCksDmXwYjTDMmAP/BfC4NZw0ZREl+Z/tRpqVdO3H+bCTDpcDc OtvZXnSoxAhBbiVBF5bf+im4oUTIeLg9A8SvkTImAouye/Ry8quiCx6UNUkrRgfneyxJ u7Ass4kZxLcCeZe1dqbp+QNhNF7dHbeBq+4DNwqf1w9UAP/kEZMrh2vbRgPl9D760QaX DX3w== MIME-Version: 1.0 X-Received: by 10.58.201.5 with SMTP id jw5mr26351615vec.6.1397335569650; Sat, 12 Apr 2014 13:46:09 -0700 (PDT) In-Reply-To: References: <1397322739 DOT 772 DOT 8 DOT camel AT AMD64X2 DOT fritz DOT box> Date: Sat, 12 Apr 2014 16:46:09 -0400 Message-ID: Subject: Re: [geda-user] Print monochromatic schematic? From: Jason White To: geda-user AT delorie DOT com Content-Type: text/plain; charset=ISO-8859-1 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Okay, I have found it and have created a patch to fix this. Starting a new threak On Sat, Apr 12, 2014 at 2:11 PM, Jason White wrote: > On Sat, Apr 12, 2014 at 1:12 PM, Stefan Salewski wrote: >> On Sat, 2014-04-12 at 12:09 -0400, Jason White wrote: >>> Is there any way currently to print schematic pages monochrome? >> >> You may be able to select black&white in your printer dialog. > Sadly it is a gray-scale only printer, no option for that. > > >> For gschem 1.8.2 we have >> >> cat /usr/share/gEDA/system-gschemrc >> >> ; output-color string >> ; >> ; Controls if output (postscript) is color (enabled) or black/white >> (disabled) >> ; >> (output-color "disabled") >> ;(output-color "enabled") >> >> Maybe there are (more) similar options in gschem 1.9.x >> > I pasted (output-color "disabled") into my local gafrc file using the > gSchem 1.9.1 release. It does day it loaded the RC file however it > does not effect print operation. > > I took a look at the source code and the function In x_print.c: > x_print_draw_page on line 139 (ish), take and argument is_color. > Forcing this value to zero causes monochromatic printing as desired. > Looking at the source reveals two problems. > > First hadling of color vs mono printing is not consistent between the > three functions below. As far as I can tell you cannot actually invoke > x_print_export_pdf and x_print_export_pdf_page from the gui as I tried > exporting PDFs and PDF pages and only draw_page__print_operation was > called. > > Second, when the view is set to black and white in gSchem > CFG_KEY_PRINTING_MONOCHROME is not being set in the global project > configuration. > > Also, it seems that w_current->toplevel->image_color is depreciated > yet still compiles? hmm... > > > Below are the Functions "that print" in x_print.c and the ways they > determine if the project is monochrome > > In x_print.c function on line 220 (ish): draw_page__print_operation > is_color = !eda_config_get_boolean (cfg, CFG_GROUP_PRINTING, > CFG_KEY_PRINTING_MONOCHROME, NULL); > > In x_print.c function on line 338 (ish): x_print_export_pdf > is_color= w_current->toplevel->image_color > > In x_print.c function on line 273 (ish): x_print_export_pdf_page > is_color = !eda_config_get_boolean (cfg, CFG_GROUP_PRINTING, > CFG_KEY_PRINTING_MONOCHROME, NULL); > > > Okay, so that brings up a question I would like to make a patch to fix > this printing issue. However, I cannot find the file and related > functions which are called from the the menu View->Dark/Light/BW where > the color scheme is set. Does anyone have any pointers? > > -- > Jason White -- Jason White