Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding Text to the Rectangle Extendable drawing tool (it works but workspace crashes)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding Text to the Rectangle Extendable drawing tool (it works but workspace crashes)

    Hello all,
    I'm trying to add text to the Rectangle Extendable drawing tool (Rectangle Tool - Extendable from all sides - NinjaTrader Ecosystem​).
    The drawing tool is working but when I try to re-open the workspace, I get these errors in the log:

    ' Chart rendering failed. There is likely a problem with a chart object's OnRender method.
    D2D error = 'HRESULT: [0x88990012], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_FACTORY/WrongFactory],
    Message: Objects used together must be created from the same factory instance.'

    ' A direct X error has occurred while rendering the chart:
    HRESULT: [0x88990012], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_FACTORY/WrongFactory],
    Message: Objects used together must be created from the same factory instance. '

    I can't figure out how to adapt the script to prevent these errors. Can someone help me please?

    Here is the script:
    Rect Ext with Text script.txt

    Thanks

    #2
    Hello tardi44,

    The error you are getting is because some resource you are creating is being created in an incorrect way. That may include brushes or other sharpdx types. I would suggest looking at the following link that goes over how to correctly create resources for rendering that also allow for render target changes. You can compare that against the changes you made to check that you are creating your own resources correctly.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by StockTrader88, 03-06-2021, 08:58 AM
    45 responses
    3,991 views
    3 likes
    Last Post johntraderuser2  
    Started by TAJTrades, Today, 09:46 AM
    0 responses
    7 views
    0 likes
    Last Post TAJTrades  
    Started by rhyminkevin, Yesterday, 04:58 PM
    5 responses
    62 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Started by realblubb, Today, 09:28 AM
    0 responses
    8 views
    0 likes
    Last Post realblubb  
    Started by AaronKoRn, Yesterday, 09:49 PM
    1 response
    19 views
    0 likes
    Last Post Rikazkhan007  
    Working...
    X