Shift-snapped bitmap cleared in TEdit when changing scale
Describe the bug
After pasting into TEdit a bitmap captured by Shift-snapping, when using the Change Scale option to change the scale factor to anything > 1 the bitmap is cleared and replaced by a white area of the corresponding size.
To Reproduce Steps to reproduce the behavior:
- sign into your Interlisp Online account
- under
Initial Exec, selectInterlisp - click
Run Medley - open a TEdit window
- use Shift-RightClick-
SNAPto capture a portion of the screen such as the Medley logo window - in TEdit, left-click the captured bitmap and select
Change Scale - enter 1.5 and press
ENTER
Expected behavior The bitmap stays visible.
Screenshots The TEdit window after capturing the bitmap:
The TEdit window after Change Scale:
The full desktop after Change Scale:
Context (please complete the following information):
- OS: chromeOS Stable
- OS Version: 119.0.6045.192
- Host arch: x86_64 (ASUS Chromebox 3)
- Maiko version: N/A
- IL:MAKESYSDATE: 15-Sep-2023 23:14:52
Additional context
After Change Scale it's still possible to operate on the bitmap and all the options of the left-click menu seem to work. The bitmap is just not displayed but its area has the appropriate size set by the scale factor. Changing the scale factor to anything <= 1 restores the visibility of the bitmap.
The fault appears to be in EXPANDBM which is producing a blank bitmap as the result of expanding the source bitmap.
But it also appears that the bitmap is being dropped out of the piece table (old and new Tedit).
On Dec 10, 2023, at 11:10 AM, Nick Briggs @.***> wrote:
The fault appears to be in EXPANDBM which is producing a blank bitmap as the result of expanding the source bitmap.
— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1457#issuecomment-1849054091, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJNOWYINUGQPQIWAR33YIYCLVAVCNFSM6AAAAABAOSQMOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGA2TIMBZGE. You are receiving this because you are subscribed to this thread.
You can observe the problem without TEDIT's involvement by doing something like this:
(INSPECT (SETQ BADBM (EXPANDBITMAP (BITMAPCOPY LOGOW) 1.5 1.5)))
EXPANDBITMAP calls EXPANDBM to do the work, but I suspect it really only works on integral scale factors.
See also SHRINKBITMAP
I looked more carefully at Tedit. It seems that the image object is there, and can be redisplayed if you click somewhere in its new (larger) region and scale it back down. So, not a Tedit problem.
On Dec 10, 2023, at 11:26 AM, Nick Briggs @.***> wrote:
You can observe the problem without TEDIT's involvement by doing something like this:
(INSPECT (SETQ BADBM (EXPANDBITMAP (BITMAPCOPY LOGOW) 1.5 1.5))) EXPANDBITMAP calls EXPANDBM to do the work, but I suspect it really only works on integral scale factors. See also SHRINKBITMAP
— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1457#issuecomment-1849058367, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJN62IH6LQXCCTMYTELYIYEHJAVCNFSM6AAAAABAOSQMOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGA2TQMZWG4. You are receiving this because you commented.