Jump to content

xod

Members
  • Posts

    632
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by xod

  1. I think this plugin was created in Delphi (Pascal). Therefore the author has not posted the code. Pascal language is still extensively used in France and elsewhere in Europe. For example, LazPaint is also written in Lazarus IDE.
  2. I don't want to abuse for your kindness but maybe you can help me in the next problem: //two sliders AmountX, AmountY with link checkbox = AmountZ; if the checkbox is ticked then AmountX and AmountY sliders is linked. propRules.Add(new LinkValuesBasedOnBooleanRule<int, Int32Property>(new ValueType[] { PropertyNames.AmountX, PropertyNames.AmountY }, PropertyNames.AmountZ, false)); //found on simonbrown site //one slider = AmountX with enable checkbox = AmountY; if the checkbox is unticked then AmountX slider is disabled. propRules.Add(new ReadOnlyBoundToBooleanRule(PropertyNames.AmountX, PropertyNames.AmountY, true));//also found on simonbrown site Now, if I have a dropdown list and I want to enable a slider when an option from that dropdown list is choosed, how can I make that? propRules.Add(new ReadOnlyBoundToBooleanRule(PropertyNames.AmountXOptionN, PropertyNames.AmountY, true));//does not work
  3. Ok, now everything is working correct. Thanks BoltBait for this small utility.
  4. My file have rtf extension not rtz but I don't understand why in the code generated from CodeLab have rtz. The Namespace is correct. Ok, I'll see tomorow what is happening. Now is late. In my country it is time 23:20. Thank you for your help.
  5. Yes, I already have that code generated from CodeLab but the .rtf text is not showed in the Help window. Only the error. What I need to do?
  6. I saw on the BoltBait's site – beyond CodeLab – how to embed an icon but does not explain how to embed the Help file. If I Add Existing item and select the .rtf file then Embedded Resource nothing happens. The message showed in Help box is an error: System.ArgumentNullException: Value cannot be null. // Change the effect's window title props[ControlInfoPropertyNames.WindowTitle].Value = "Test01"; // Add help button to effect UI props[ControlInfoPropertyNames.WindowHelpContentType].Value = WindowHelpContentType.CustomViaCallback; props[ControlInfoPropertyNames.WindowHelpContent].Value = "Test01Effect.Test01.rtz"; Maybe someone can help me. Thanks in advance.
  7. Just a little observation about CodeLab: if the file name begins with a digit, the dll file is not build.
  8. Condolences. God rest her soul in peace.
  9. Thanks EER, I'm waiting the link.
  10. @BoltBait, I have some question: Because it's a Class Library file and not an exe file the code can not be run in VS. Correct? But if I make the GUI and the code in VS how to transform the exe file to dll file that can be run in paint.net? What should I do besides adding references to PDN and transform Windows Form App to Class Library? @sashwilko Change the Font color (white) to another one. I added an option for digital clock. You must install the font found in the zip archive.
  11. Thanks to all who have appreciated my work. I am convinced that someone else could do the work much better because I'm just a beginner in C #. If someone wants to make another plugin is my guest and I will remove my plugin. I do not know how to port the code to Visual Studio. I have not found any detailed explanation about this except one of EER from VS2010. I think it would be useful to make a post for explaining in detail with screenshots for those who don't know english very well.
  12. I made the changes specified by Eli and toe_head2001. See first post.
  13. @Eli: Font size increased to 100. Download the new version. @toe_head: For me, on Win10, when the plugin starts, it automatically chooses the first font in the list of installed fonts - one that starts with the letter A (Arial in most cases).
  14. Thanks Eli. I think the GUI is already quite high. Adding two color wheels would make GUI more bigger.
  15. A very simple plugin to render clock. Clock.zip
  16. I try to make a plugin to draw angles. But when I decrease the diameter to minimum and move the radius to zero the system crashes. It is probably a math problem because if I give up to one of the arrows everythings works. Some advices? Thanks. #region UICode IntSliderControl Amount1 = 90; // [-180,180] Start DoubleSliderControl Amount2 = 0.5; // [0.1,1] Diameter #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); float centerX = ((selection.Right - selection.Left) / 2)+selection.Left; float centerY = ((selection.Bottom - selection.Top) / 2)+selection.Top; float diameterU = (float)Amount2 * Math.Min(selection.Width - 4, selection.Height - 4); float radiusU = diameterU / 2f; float startU = (float)Amount1 - 90; float arc1 = radiusU*0.5f; float angle = (float)Amount1; dst.CopySurface(src, rect.Location, rect); using (RenderArgs ra = new RenderArgs(dst)) { Graphics g = ra.Graphics; g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; g.Clip = new Region(rect); g.TextRenderingHint = TextRenderingHint.AntiAlias; StringFormat format = new StringFormat(); format.Alignment = StringAlignment.Center; format.LineAlignment = StringAlignment.Center; AdjustableArrowCap myArrow = new AdjustableArrowCap (3, 6); using (Pen gPen = new Pen(ColorBgra.Black)) using (SolidBrush textBrush = new SolidBrush(Color.Black)) using (Font textFont = new Font("Tahoma", 11, FontStyle.Regular)) { gPen.CustomEndCap = myArrow; float angleU = startU; double radianU = Math.PI / 180 * angleU; float endX = (float)(radiusU * Math.Sin(radianU)); float endXtxt = (float)((radiusU + 25) * Math.Sin(radianU)); float endY = (float)(radiusU * Math.Cos(radianU)); float endYtxt = (float)((radiusU + 25) * Math.Cos(radianU)); g.DrawLine(gPen, centerX, centerY, centerX - endX, centerY - endY); g.DrawString((angle).ToString(), textFont, textBrush, centerX - endXtxt, centerY - endYtxt, format); gPen.CustomStartCap = myArrow; //if I give up to this line everythings works g.DrawArc(gPen, centerX - arc1, centerY - arc1, arc1 * 2, arc1 * 2, 0, - angle); } } }
  17. I try to make a plugin created in CodeLab v2.18 compatible with v1.8. The error I receive is: The space or namespace 'HatchBrush' could not be found (are you missing a using a directive or an assembly reference?) Same with 'AdjustableArrowCap'. using (HatchBrush pieBrush = new HatchBrush(HatchStyle.BackwardDiagonal, Color.Gray, Color.Transparent)) using (AdjustableArrowCap myArrow = new AdjustableArrowCap(3, 6)) Thanks in advance for your help.
  18. There is a fast option to Fit to window when I open a new pdn file (800x600px)? This can be achieved by following commands: Ctrl+A Ctrl+Shift+B Ctrl+D Thanks in advance.
×
×
  • Create New...