Hi , For new backend , we are trying to change Length unit Option in View menu to inch or centimeter. Geometry Feature displays TL_X [in], though option values[tl-x- etc] are not converted to inches or centimeters based on Length Unit selection as shown in Screenshot. Value being displayed in geometry options (tl_x,etc) is in mm only. [TL_X -etc ] Units are in SANE_UNIT_MM and using xsane as frontend. Can anyone tell us how to convert based on Length unit selection ?
Regards Ganapati Hegde -----Original Message----- From: Olaf Meeuwissen [mailto:olaf.meeuwis...@avasys.jp] Sent: Wednesday, September 19, 2012 2:31 PM To: Ganapati Hegde Cc: sane-devel at lists.alioth.debian.org Subject: Re: [sane-devel] Xsane Length unit under View menu Ganapati Hegde writes: > Hi, Hi > 1. For new backend We are trying to access the length unit of the > geometry group for user defined paper sizes. Paper sizes have a name like A4 or Letter. They don't have any units, that is, they're SANE_UNIT_NONE. I guess what you are trying to achieve is switching the units for a size description that's tagged onto the name. This is not supported by SANE. > We see that the tl_x ,tl_y ,br_x, br_y is always set in mm, inspite of > the UI showing text (in) as in the attached screenshot. Also is there > any setting that we can inform Xsane to handle this? We have set the > Lenght unit in the option descriptor as MM as we sending all values to > XSane in mm. XSane has a "Length unit" option in the "View" menu that let's you pick a preferred display unit. Internally all geometry handling is done in terms of SANE_UNIT_MM (or SANE_UNIT_PIXEL). > 2. For user defined paper sizes, if we change the Geometry, the rect in > the preview is not getting redrawn. > Can anyone tell us how to initiate redraw of the rectangle to reflect > the goemetry cordinates. When the paper size is changed in the backend, do you update the well-known geometry options (tl-x, etc.) too? Do you inform the frontend that other options may have changed? You need to do so by or-ing in the SANE_INFO_RELOAD_OPTIONS in the last argument to sane_control_options(), after checking that the frontend didn't pass a NULL pointer of course. Hope this helps, -- Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- AVASYS CORPORATION FSF Associate Member #1962 Help support software freedom http://www.fsf.org/jf?referrer=1962 ______________________________________________________________________________ DISCLAIMER: This electronic message and any attachments to this electronic message is intended for the exclusive use of the addressee(s) named herein and may contain legally privileged and confidential information. It is the property of Celstream Technologies Private Limited. If you are not the intended recipient, you are hereby strictly notified not to copy, forward, distribute or use this message or any attachments thereto. If you have received this message in error, please delete it and all copies thereof, from your system and notify the sender at Celstream Technologies or administrator at celstream.com immediately. ______________________________________________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Geometry_Screenshot.PNG Type: image/png Size: 32836 bytes Desc: Geometry_Screenshot.PNG URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120926/267a3b85/attachment-0001.png>