コミュニティ

Setting focus on a part of an image

Can anyone help me to set the focus for a field to a certain part of the image? . I'm using a flexible document definition and when field is not found i would like to focus in an area where the user could see if the field is really missing without having to scroll.
Thanks

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

5件のコメント

  • Avatar
    Anastasiya Nechaeva
    0
  • Avatar
    Anastasiya Nechaeva
    You can try the following approach:

    In a Block properties check Expression and input this code


    Rect OutputRect = YourRegion;
    If SearchElements.HisSourceElement.IsFound Then
    {
    OutputRect = SearchElements.HisSourceElement.Rect;
    }
    Else
    {
    IsNull = True;
    }
    OutputRegion = OutputRect;


    where YourRegion – required region in global coordinates
    0
  • Avatar
    Alberto Torino
    Thanks for your feedback Anastasiya..

    I have something similar but it does not seem to be working:

    Rect outputRect;
    if avc_04r.dFecha.IsFound then
    outputRect = Rect(dfecha.Rect.Left,dfecha.Rect.Top, dfecha.Rect.Right, dfecha.Rect.Bottom);
    else
    outputRect = Rect(1613pt, 1175pt, 2091pt, 1234pt);
    OutputRegion = outputRect;

    If element avc_04r.dFecha is not found i intent to focus on rect Rect(1613pt, 1175pt, 2091pt, 1234pt). This value is obtained using the measure rectangule tool. Are the units correct? Because it does not seem to work.

    Thanks,
    0
  • Avatar
    Anastasiya Nechaeva
    Your script should be working.
    Please share a simple demo project where we can see what you do, what you get and please describe which behavior you actually expect.
    0
  • Avatar
    Alberto Torino
    Anastasiya,
    Thanks again for your support. i've found that the problem is a matter of units. Changing units in function Rect from pt to dt, makes it works as expected.
    0

サインインしてコメントを残してください。