Jump to content

midora

Members
  • Posts

    1,782
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by midora

  1. Image To Code (AKA Image To C) Plugin does not appear in the save as filetypes list. There is no entry in Settings->Plugin errors. Seems that Paint.NET decides that it is not compatible earlier. No issues in 3.5.11.
  2. Here a screenshot of dragging the forum logo from the browser to Paint.NET. It's the pixel before the mouse enters the area of the Paint.NET window. So you still see the ghost image of the dragged item. If the mouse is moved one more pixel to the left then the ghost image disappears and you will just see the mouse pointer with the rectangle and the copy/move/forbidden indicator. Microsoft introduced this interface years ago in XP and I got never a problem supporting it in an application. The interface just allows the DropTarget to adapt the DragEventArgs.Effect settings so that the DragSource may react.
  3. It's for sure just a cosmetic thing. It's about user experience. In the moment if you are dragging a file from Windows Explorer (or other applications like Firefox) to Paint.NET then you will see a ghost image of the content of the file (or files). This ghost image disappears if you are reaching the border of the Paint.NET window because the Drag and Drop Helper is not supported in Paint.NET. I would give the Drag & Drop Helper a chance.
  4. There is one small thing I'm missing in the drag and drop implementation. There is no ghost image if you are dragging an object on top of Paint.NET. Seems the Drag and Drop Helper interface is not used. Typically you are just adding one line to OnDragEnter, OnDragOver, OnDragLeave and OnDragDop. I.e. protected override void OnDragEnter(DragEventArgs e) { // Your code here DropHelper.DragEnter(e); } Here is a a DragDropHelperLib.cs to access the unmanaged com interfaces. // Based on 'Shell Style Drag and Drop in .NET (WPF and WinForms)' // http://blogs.msdn.com/b/adamroot/archive/2008/02/19/shell-style-drag-and-drop-in-net-wpf-and-winforms.aspx using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; using System.Windows.Forms; namespace DragDropHelperLib { #region Native data structures [StructLayout(LayoutKind.Sequential)] public struct Win32Point { public int x; public int y; public Win32Point(int x, int y) { this.x = x; this.y = y; } } [StructLayout(LayoutKind.Sequential)] public struct Win32Size { public int cx; public int cy; } [StructLayout(LayoutKind.Sequential)] public struct ShDragImage { public Win32Size sizeDragImage; public Win32Point ptOffset; public IntPtr hbmpDragImage; public int crColorKey; } #endregion // Native data structures #region IDragSourceHelper [ComVisible(true)] [ComImport] [Guid("DE5BF786-477A-11D2-839D-00C04FD918D0")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IDragSourceHelper { void InitializeFromBitmap( [In, MarshalAs(UnmanagedType.Struct)] ref ShDragImage dragImage, [In, MarshalAs(UnmanagedType.Interface)] System.Runtime.InteropServices.ComTypes.IDataObject dataObject); void InitializeFromWindow( [In] IntPtr hwnd, [In] ref Win32Point pt, [In, MarshalAs(UnmanagedType.Interface)] System.Runtime.InteropServices.ComTypes.IDataObject dataObject); } #endregion // IDragSourceHelper #region IDropTargetHelper [ComVisible(true)] [ComImport] [Guid("4657278B-411B-11D2-839A-00C04FD918D0")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IDropTargetHelper { void DragEnter( [In] IntPtr hwndTarget, [In, MarshalAs(UnmanagedType.Interface)] System.Runtime.InteropServices.ComTypes.IDataObject dataObject, [In] ref Win32Point pt, [In] int effect); void DragLeave(); void DragOver( [In] ref Win32Point pt, [In] int effect); void Drop( [In, MarshalAs(UnmanagedType.Interface)] System.Runtime.InteropServices.ComTypes.IDataObject dataObject, [In] ref Win32Point pt, [In] int effect); void Show( [In] bool show); } #endregion // IDropTargetHelper #region DragDropHelper [ComImport] [Guid("4657278A-411B-11d2-839A-00C04FD918D0")] public class DragDropHelper { } #endregion // DragDropHelper public class DropHelper { public static void DragEnter(DragEventArgs e) { Win32Point wp = new Win32Point(e.X, e.Y); IDropTargetHelper dropHelper = (IDropTargetHelper)new DragDropHelper(); dropHelper.DragEnter(IntPtr.Zero, (System.Runtime.InteropServices.ComTypes.IDataObject)e.Data, ref wp, (int)e.Effect); } public static void DragOver(DragEventArgs e) { Win32Point wp = new Win32Point(e.X, e.Y); IDropTargetHelper dropHelper = (IDropTargetHelper)new DragDropHelper(); dropHelper.DragOver(ref wp, (int)e.Effect); } public static void DragLeave() { IDropTargetHelper dropHelper = (IDropTargetHelper)new DragDropHelper(); dropHelper.DragLeave(); } public static void DragDrop(DragEventArgs e) { Win32Point wp = new Win32Point(e.X, e.Y); IDropTargetHelper dropHelper = (IDropTargetHelper)new DragDropHelper(); dropHelper.Drop((System.Runtime.InteropServices.ComTypes.IDataObject)e.Data, ref wp, (int)e.Effect); } } public class DragHelper { public static void Source(ShDragImage shdi, DataObject data) { IDragSourceHelper sourceHelper = (IDragSourceHelper)new DragDropHelper(); sourceHelper.InitializeFromBitmap(ref shdi, data); } } }
  5. Looks like there is a problem with your PDN 3.5.11 installation (maybe the core dll is defective). I would try to reinstall. The rules do not state that you should not ask for help. If you really have no idea what's the matter then you should ask. This does not mean that anybody is able to help.
  6. Dragging an image from Firefox to Paint.NET shows a bad filename and extension. I.e. http://css-tricks.com/examples/RoundButtons/images/bg.png The file is streamed OK (it shows transparency) but the filename is something ending with .bmp located in the users temp folder. I expect that you are streaming the file from "FileContents" but taking the name form DataFormats.FileDrop and not from "FileGroupDescriptorW" because "FileGroupDescriptorW" does not contain a path. I would propose to take the "FileGroupDescriptorW" name, set the file to dirty, and allow only "Save As" for this file (simular to "Paste to new image") No idea what kind of code you are using to stream the file but http://www.codeproject.com/Articles/28209/Outlook-Drag-and-Drop-in-C works quite good (if all fixes are integrated to the code) and contains handling of files and contents arrays. The code is not specific to Outlook.
  7. Paint.NET restores the glass border now after wakeup from hibernate. There is only one issue left in this area on my computer. If I'm using "Switchable Graphics" to switch between "Power-saving GPU" and "High-performance GPU* then the glass area gets opaque black, the top left and right window corners are no longer rounded and the system buttons disappeared. In my own applications I fixed it by restoring the glass border on WM_DISPLAYCHANGE (the hibernating issue on WM_POWERBROADCAST). But iin the Paint.NET case it seems to be an issue with the non-clientarea.
  8. I'm not bEPIK but I talked in what he quoted about the dialogs (the background in the blue scheme is gray already). One additional think about the blue scheme. Could you change the look of the close button on the active image tab back to the vista style as in 3.5.11? In the moment it's this flat red look. BTW: This close button behaves a little bit strange. If you are pressing the button and dragging the pointer out of the close button bounds then the button disappears and never reappears. But the click behaviour is correct. So if the mouse is out of bounds the close operation will not be executed.
  9. As pdnnob told it is and exclusive or operation on bitlevel. So for each bit N in the 24 bit RGB triple compositeBitN = layer1BitN ^ layer2BitN (0^0=0, 1^0=1, 0^1=1, 1^1=0) Alpha handling is more complex. So I would use opaque layers only.
  10. Sure. This rounding stuff is not as easy to implement as it sounds. Disabled snapping should be easier later on. In addition this modification may also impact cursorposition and selection (showing fractions of pixels) which may confuse users. All the work just because the low rez screens out there...
  11. Great that we got antialiased selections, there is just one thing I'm missing in the current implementation. If you are working zoomed in, you should be allowed to drag the selection on view-pixel/sub-pixel base. In the moment it's document-pixel based. I'm not sure if the setting of the drawing tools antialiased switch should control this behaviour. The shape tools and brushes are working sub-pixel based already (if draw-antialiasing is enabled). Means the coloring of the pixels depends where inside of a pixel you are starting the tool.
  12. Do you expect a purposive discussion starting a thread in a sarcastic way? In general it's a good design to initiate actions just with the left button because the user is used to get a context menu with the right one. You are right this is not the case in Paint.NET and previous versions used the right button for rotation, but maybe there are reasons (ie. design for stylus or touch), You just don't know. And I'm not sure you will getting an answer on a statement. I would also prefer a to get back the old behaviour but to adapt your workflow is not a big deal. PS: Sorry, but writing a reply and just get blocked is a little bit frustrating. The moderators in this forum are much too fast ;-)
  13. Shrinking a small font size just because it does not fit is not the best idea. Personally, I don't like this statusbar 'feature'. Texts should be cutted using ... and show in a tooltip the full text.
  14. If technically possible I would prefer to get the menu tooltips of plugins only in the case that the mouse pointer is on top of the puzzle symbol. In the moment it's a little bit annoying to get these large tooltips just by hovering the menu.
  15. Thanks for allowing to change the color scheme between blue and light. It looks like that dialogs use the light scheme always. I would prefer to get the grayish one back if blue scheme is selected. Is there a way for plugins to detect which scheme is used so that they can adapt their background?
  16. IMHO "Freeform" is a little bit to generic. Still we are talking about a rectangle. Maybe "Variable Size".
  17. In general I would propose to change the text "Normal" to "Not Fixed" because this would allow you to guess that there must be a fixed variant.
  18. The blending mode in the Tool bar shows just two variants of the flask for the compositing modes over and copy. IMHO it makes no sense to add an individual image for each mode, but maybe a third variant would be nice. Flask filled with green: Normal mode Flask filled with red: Other modes (with more power) Flask empty: Overwrite mode
  19. The pixel grid and the markers in the rulers are compared to 3.5.11 one pixel shifted. So let's say the horizontal marker line 100 is at the right side of pixel 99 (Paint.Net 3.5.11 at pixel 100). I expect that's a wanted modification and not a bug?
  20. The tooltip of the ToolStripDropDownButton in the ToolStrip just shows "Tool:". Looks like it's the default value. It may show the name of the tool plus shortcut (like in the Tools panel), or "Tool selection", or just nothing.
  21. Please provide a screenshot (and maybe a picture taken with a camera. I would like to see how it looks on such a device ;-). It's always the best to provide Rick as much information as possible. Pretty sure there is a scaling issue as you are assuming. In general Paint.NET is quite good in handling non 96dpi screens (compared to other applications).
  22. I know. That's what this option is for in PDN4. Tools typically just showing the set of global options they are using to do their job. Now i.e. zoom, pan and the color picker allow to change this option w/o any effect to their job. But it's not an important story, just a question of design for non power users.
×
×
  • Create New...