Jump to content

AndrewDavid

Members
  • Posts

    1,592
  • Joined

  • Last visited

  • Days Won

    28

Posts posted by AndrewDavid

  1. @Rick Brewster This error just appeared today. 

    Spoiler

     

            deviceContext.Factory.RegisterEffectFromBlob(
                D2D1PixelShaderEffect.GetRegistrationBlob<SquareBlurShader, SquareBlurTransformMapper>(out Guid effectID));

     

     

    SquareBlurGpuEffect.cs

    Lines 57 & 58

     

    Severity    Code    Description    Project    File    Line    Suppression State
    Error    CS0305    Using the generic method 'D2D1PixelShaderEffect.GetRegistrationBlob<T>(out Guid)' requires 1 type arguments    AndrewDavidsPlugins    C:\Users\Andrew\Desktop\AndrewDavidsPlugins\SquareBlurGpuEffect.cs    57    Active

     

    Its not a problem with your solution - Its a problem with my Visual Studio.

     

    • Thanks 1
  2. 7 hours ago, John Peter said:

    If you care to correct this newbie's opinion that there is an abyss between paint.net version 4 plugins and the new paint.net version 5.11.x, please advise.

     

    In the past both the app and the plugins did not have access to the GPU (Graphics Processing Unit)

     

     The CPU handles all the tasks required for all software on your computer to run correctly. A GPU, on the other hand, supports the CPU to perform concurrent calculations. A GPU can complete simple and repetitive tasks much faster because it can break the task down into smaller components and finish them in parallel.

     

     A graphics card (also called a video card, display card, graphics adapter, VGA card/VGA, video adapter, display adapter, or colloquially GPU) is a computer expansion card that generates a feed of graphics output to a display device such as a monitor.

     

    With the introduction of a few new base structures and the updated software environment we are in, Paint.Net is now running with better and faster performance. 

     

    I understand exactly what you are saying.  

     

    Unless you are building your own plugins as a user you should see no difference other than faster and better performance.

    @Rick Brewster You didn't let me finish.

    Hope this helps @John Peter

  3. @BoltBait and your unfinished ones. Drawing Text in a GPU Drawing Plugin.

    Followed your directions but it generates an error. I am trying to use the API references to figure it out without asking you.

     

    Spoiler

    There is no argument given that corresponds to the required parameter 'serviceType' of 'IServiceProvider.GetService(Type)'

     

    I know the API's do not provide examples, but I should be able to find the reference needed to correct this.

    AM I close? 

    https://paintdotnet.github.io/apidocs/api/PaintDotNet.DirectWrite.DirectWriteFactory.CreateRef.html

  4. @ReMake the script @BoltBait provides does not allow color change, size width or position. (Baby Steps)

    That is why I want to use yours. I tried on my own to figure it how to add the controls myself - now I have the answer but feel guilty using your script without your approval.

    Think of the code your script contains that his does not.  That would be the next step in a tutorial - but I don't think he wants to go that far. That's the code I am referring to.

  5. Request @ReMake

    Now that I see it working - I would like to include it in my next Plugin Template release. The one I just posted is only the UI. No working script. If approved I can go on to a Chapter 2 of my plugin template.

     

    Request @Rick Brewster

     Can you approve the use of your source code that resides in my Repository to create templates of 2 specific type of plugins to identify the different types of effects.  Yours is the only code I have seen that does not generate that WindowsBase error in VS2022. I think 4 templates would be a great asset for anyone coding in VS2022.

     

    I think I can do Classic on my own. I did publish one, and I just remembered how I did it. :)

     

    Quick while everything is in sync. I know how fast things change.

     

  6. @BoltBait I don't think this was intentional. image.png.345132999ca9c6723f9df7e9c13c0290.png

     

    Nor this 

     

     

     

    Spoiler

    Application version: paint.net 5.0.11 (Stable 5.11.8685.3093)
    Time of crash: 10/15/2023 12:39:40 PM
    Application uptime: 00:11:44.0489858
    Application state: Running 
    Working set: 474,424 KiB
    Handles and threads: 1524 handles, 60 threads, 273 gdi, 214 user
    Install type: Classic
    Application directory: C:\Program Files\paint.net
    Current directory: C:\Program Files\paint.net
    Install directory: C:\Program Files\paint.net
    OS Version: Windows 10 Home 10.0.19045.0 x64
    .NET version: .NET 7.0.12 x64
    Processor: "Intel(R) Core(TM) i5-4460  CPU @ 3.20GHz" @ ~3193MHz (4C/4T, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2)
    Memory: 8,143 MB physical (1,927 MB free), 133,947,456 MB virtual free, 18,987 MB pagefile (8,175 MB free)
    Video card: NVIDIA GeForce GT 720 (fl:11.0, v:10DE, d:1286, r:A1), Microsoft Basic Render Driver (fl:12.1, v:1414, d:8C, r:0)
    Hardware acceleration: True (default: True) (rendering: 🚀 Performance (NVIDIA GeForce GT 720))
    Remote session: no
    Pointers: none
    UI animations: True
    UI DPI: 96 dpi (1.00x scale)
    UI theme: VisualStyleCategory=Aero, EffectiveTheme=Aero, DWM=yes, AeroColorScheme=Dark, ThemeFileName=Aero.msstyles
    Updates: True, 10/15/2023
    Locale: pdnr.c: en-US, hklm: en-US, hkcu: en-US, cc: en-US, cuic: en-US
    Flags: 

    Exception details:
    System.TypeInitializationException: The type initializer for 'PdnCodeLab.Intelli' threw an exception.
     ---> System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.7.9, Version=0.7.9.1561, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
    File name: 'OptionBasedLibrary v0.7.9, Version=0.7.9.1561, Culture=neutral, PublicKeyToken=null'
       at System.ModuleHandle.ResolveType(QCallModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
       at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
       at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
       at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctorWithParameters, Boolean& isVarArg)
       at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
       at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
       at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit)
       at PdnCodeLab.Intelli.<>c__DisplayClass66_0.<.cctor>b__1(Assembly a)
       at System.Linq.Enumerable.WhereArrayIterator`1.ToArray()
       at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
       at PdnCodeLab.Intelli..cctor()
       --- End of inner exception stack trace ---
       at PdnCodeLab.CodeTextBox.ParseVariables(Int32 position, Boolean localOnly)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)

     

    If I had received a notification when you posted it - You would have had this sooner.

    The issue was caused when I ran Codelab a second time.

    Hope this helps :)

×
×
  • Create New...