Jump to content

Viktor Akselrod

Administrators
  • Posts

    470
  • Joined

  • Last visited

  • Days Won

    88

Posts posted by Viktor Akselrod

  1. Hello.

    TfgAnimationHelper.HideForm(Self, [TfgAnimationOption.ReleaseOnFinish]) - this call does not close immediately form.

    first plays the animation, then enqueues the deletion and only then deletes the form.
    during this time fgBarcodeScanDetected may fire several more times.

    so it is important to prevent for double form destruction.

    • Like 1
  2. Besides the bugfix, please fix the logic as follows:

    procedure TFCamera.CloseForm (OK: boolean);
    begin
      if FCamera = nil then
        Exit;
    
      if OK and Assigned (FOnReadCode) and (fgLabCode.Text <> '-') then FOnReadCode (fgLabCode.Text);
    
      TfgAnimationHelper.HideForm (Self, [TfgAnimationOption.ReleaseOnFinish]);
      FCamera: = nil;
    end;

    fgBarcodeScanDetected  and TfgAnimationHelper.HideForm both are called asynchronously. 

    TfgAnimationHelper.HideForm with TfgAnimationOption.ReleaseOnFinish flag should not be allowed to call more than once, otherwise it will lead to double destruction of the form and memory corruption.

     

  3. Здравствуйте.

    19.02.2021 в 07:46, Stas сказал:

    1) TfgCollectionView не отрабатывает fgCollectionView OnTapItem при наличии TfgCardPanel

    Подтверждаю проблему.

    19.02.2021 в 07:46, Stas сказал:

    2) TfgToastFactory.Show() Access Violation (появилось в 1.9.2.1 вроде)

    Это не воспроизводится. Вы можете привести больше деталей относительно окружения? Проявляется ли в пустом проекте? 

  4. Hello, Michal.

    5 hours ago, Michal said:

    If you do moveto(0 0), lineto (100 100) and then lineto (200 200) second line will be drawn from 0 0 to 200 200 not from 100 100 to 200 200. 

    M0,0 L100,100 200,200 is one diagonal line, nothing is visually clear.
    M0.0 L100.0 200,200 will be much clearer - here you will see a triangle.

    WhatsApp Image 2021-01-10 at 13.52.49.jpeg

    3 hours ago, Michal said:

    Maybe it is a control point?

    This happens because when two bezier curves go in a row, the first control point is taken not from the "pen position", but 

    Quote

    The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an C, c, S or s, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve).

    more details (command "S")

    In order not to break the path and start drawing a second bezier curve from the "pen position" you can replace MoveTo with LineTo.

      path:=TfgPath.Create;
      path.MoveTo(10,10);
      path.AddSmoothCurve(PointF(40,10),PointF(40,20));
      path.LineTo(40,20); // !!!
      path.AddSmoothCurve(PointF(80,10),PointF(120,50));
    

    Result (bottom image):

    WhatsApp Image 2021-01-10 at 13.52.50.jpeg

     

    Thank you.

    • Like 2
  5. Hello, Michal.

    The fill is applied to closed subpaths. The command MoveTo interrupts the current subpath and the next command starts a new subpath.
    Please, try to remove all MoveTo commands and check the result.
    In most cases, it makes no sense to use the MoveTo command explicitly, since the pen will be at the end point of the last command.

    Thank you.

  6. Здравствуйте.

    Подтверждаю проблему.

    Постараемся исправить в ближайшее время.

    PS строки Bitmap.Canvas.EndPaint; и Bitmap.SaveToFile(filename); надо как минимум поменять местами

    PPS try finally поставить между конструктором и деструктором для надежности.

×
×
  • Create New...