Using TsMagnifier

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #37014
    Ronaldo Souza
    Participant

    I'm seting up an acessibility option in our apps and I'm having some problems with TsMagnifier.

    The way I thought I could use it was to setup a global kotkey in my main form using JVCL's TJvApplicationHotKey,

    which would fire its global OnHotKey event over the entire application. It works in principle, but sometimes the

    magnifier gets a bit crazy (version 10.30 seems to get a bit crazier than 10.29 but haven't done much testing yet):

    [attachment=7744:Test01.jpg]

    SOMETIMES, when I activate the magnifier over a second or third-level form, the active part of the lens gets separated

    from the border, as shown in the picture above.

    To reproduce the problem, which doesn't happen always, I'm attatching a small project: click on one of the menu options and

    press Ctrl+Z to activate the magnifier and drag it around; if the frame moves with the active area, close it, close the

    form and try again.

    [attachment=7745:Magnifier.zip]

    If my approach isn't appropriate, what would you suggest to have a magnifier over an entire application?

    Thanks in advance!

    Best regards,

    Ronaldo

    #55060
    Support
    Keymaster

    Thank you for the good demo-app. I see the problem and I will fix it soon.

    #55228
    Ronaldo Souza
    Participant
    'Support' wrote:

    Thank you for the good demo-app. I see the problem and I will fix it soon.

    The problem seems to be fixed with version 11.04 beta, but I'm getting a bunch of unrelated “EInvalidGraphicOperation: Scan line index out of range” in a totally unrelated part of the program which runs fine with 10.30.

    I can't pinpoint the cause of the problem, but the exception happens in unit acSBUtils, procedure TacComboBoxWnd.acWndProc, so I added a TRY/EXCEPT and some logging to this procedure and this is is typical of what I got:

    Code:
    30/06/2016 13:33:40: Exception.Message – EInvalidGraphicOperation: Scan line index out of range
    TMessage – WParam:00170BFA LParam:00000000 Result:00000001 – WParamLo:0BFA WParamHi:0017 LParamLo:0000 LParamHi:0000 ResultLo:0001 ResultHi:0000
    30/06/2016 13:33:57: Exception.Message – EInvalidGraphicOperation: Scan line index out of range
    TMessage – WParam:0015019C LParam:00000000 Result:00000001 – WParamLo:019C WParamHi:0015 LParamLo:0000 LParamHi:0000 ResultLo:0001 ResultHi:0000
    30/06/2016 13:34:10: Exception.Message – EInvalidGraphicOperation: Scan line index out of range
    TMessage – WParam:001A01D4 LParam:00000000 Result:00000001 – WParamLo:01D4 WParamHi:001A LParamLo:0000 LParamHi:0000 ResultLo:0001 ResultHi:0000

    Hope it helps,

    Ronaldo

    #55229
    Support
    Keymaster

    Thank you for the message.

    What is version number of your Windows?

    #55230
    Ronaldo Souza
    Participant
    'Support' wrote:

    Thank you for the message.

    What is version number of your Windows?

    6.1.7601 Service Pack 1 Compilation 7601

    Windows 7 Pro 64 bits Service Pack 1

    Best regards,

    Ronaldo

    #55231
    Support
    Keymaster

    When you receives these error messages?

    Can I repeat it in your demo?

    #55232
    Ronaldo Souza
    Participant
    'Support' wrote:

    When you receives these error messages?

    Can I repeat it in your demo?

    Nope. As I said, it's in a totally unrelated part of the program and has nothing to do with the magnifier. I probably shoud've created a new thread. Sorry. I just mentioned it here because I've never seen this exception before (from version 10.18 to 10.30) and I noticed it while testing my apps with 11.04 beta regarding the magnifier problem.

    Best regards,

    Ronaldo

    #55233
    Ronaldo Souza
    Participant
    'Support' wrote:

    When you receives these error messages?

    Can I repeat it in your demo?

    This is the form that triggers the error:

    [attachment=7758:ExceptionForm.jpg]

    #55234
    Ronaldo Souza
    Participant

    If you provide links to beta versions 11.00, 11.01, 11.02 and 11.03, I'd be glad to test them to see if and when this exception starts to happen.

    Best regards,

    Ronaldo

    #55235
    Support
    Keymaster

    I think, this error exists in all subversions of version 11.

    Can you give me Dfm-file for this form, please?

    #55243
    Ronaldo Souza
    Participant
    'Support' wrote:

    I think, this error exists in all subversions of version 11.

    Can you give me Dfm-file for this form, please?

    I've sent it to support@alphaskins.com.

    Best regards,

    Ronaldo

    #55249
    Support
    Keymaster

    Thank you. But this form doesn't helps, unfortunately.

    Maybe you can catch and show a full callstack for this error?

    Also, can you try to replace a combobox on this form to TsComboBox? What result will you have?

    #55259
    Ronaldo Souza
    Participant
    'Support' wrote:

    Thank you. But this form doesn't helps, unfortunately.

    Maybe you can catch and show a full callstack for this error?

    Also, can you try to replace a combobox on this form to TsComboBox? What result will you have?

    1) If I replace the regular TComboBox by TsComboBoxes, the exception goes away.

    2) Just noticed this exception is happening in other forms containing regular combo boxes.

    3) If I turn skins off, the problem goes away.

    4) Doing a bit of debugging, the exception seems to be happening in unit sAlphaGraph, procedure DrawSkinGlyph, line “CopyTransRect(Bmp, MasterBitmap…”:

    Code:
    CALL STACK:
    DrawSkinGlyph($7778F44,(351, 12),???,1,(nil, 'COMBOBOX', 'GLYPHMASK', (32, 63, 59, 68, (32, 63), (59, 68)), 3, 0, 0, 0, itisaGlyph, $26BBFF0, 0, 0, 0, 0, 0, 67, 9, 5),($7778F44, 0, 0, 16711935, (0, 0, 0, 0, (0, 0), (0, 0)), True))
    TacComboBoxWnd.PaintButton(???)
    TacComboBoxWnd.RepaintButton
    TacComboBoxWnd.acWndProc(???)
    TsSkinProvider.AC_WMActivate(???)
    TsSkinProvider.NewWndProc((6, 1, 657264, 0, 1, 0, 1904, 10, 0, 0))
    TacMainWnd.CallPrevWndProc(???,???,1,657264)
    TacScrollWnd.acWndProc((6, 1, 657264, 0, 1, 0, 1904, 10, 0, 0))

    Code:
    procedure DrawSkinGlyph(Bmp: TBitmap; P: TPoint; State, AddedTransparency: integer; const MaskData: TsMaskData; const CI: TCacheInfo);
    var
    w, h, cy, cx, dw: integer;
    begin
    w := MaskData.Width;
    h := MaskData.Height;
    if State >= MaskData.ImageCount then
    State := MaskData.ImageCount – 1;

    dw := State * w;
    cy := iff(p.y < 0, -p.y, 0);
    cx := iff(p.x < 0, -p.x, 0);
    with MaskData.R do
    if MaskData.Bmp = nil then
    with TsSkinManager(MaskData.Manager) do begin
    if (MaskData.Manager nil) and (MaskData.ImageCount > 0) then
    if MaskData.MaskType > 0 then
    BlendGlyphByMask(Rect(p.x + cx, p.y + cy, p.x + w – 1 + cx, p.y + h + cy {- 1}),
    Rect(dw + cx + Left, cy + Top, dw + w – 1 + cx + Left, h – 1 + cy + Top),
    Bmp, MasterBitmap, AddedTransparency, MaskData)
    else
    if AddedTransparency 1 then
    BlendTransRectangle(Bmp, p.x + cx, p.y + cy, MasterBitmap,
    Rect(dw + cx + Left, cy + Top, dw + cx + Left + w – 1, cy + Top + h – 1),
    127)
    else
    >>>>>>>>>> CopyTransRect(Bmp, MasterBitmap, p.x + cx, p.y + cy, <<<<<<< EXCEPTION HERE
    Rect(dw + cx + Left, cy + Top, dw + cx + Left + w – 1, cy + Top + h – 1),
    clFuchsia, CI, True);
    end
    else
    if (Right <= MaskData.Bmp.Width) and (Bottom <= MaskData.Bmp.Height) then
    BlendGlyphByMask(Rect(p.x + cx, p.y + cy, p.x + w – 1 + cx, p.y + h + cy – 1),
    Rect(dw + cx + Left, cy + Top, dw + w – 1 + cx + Left, h – 1 + cy + Top),
    Bmp, MaskData.Bmp, AddedTransparency, MaskData);
    end;

    Hope it helps!

    Best regards,

    Ronaldo

    #55263
    Ronaldo Souza
    Participant

    Did some quick testing and, as far as I can tell, both the issue with the magnifier and the exception are solved in 11.05beta.

    Good job!

    Best regards,

    Ronaldo

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.