roro69

Members
  • Content count

    20
  • Joined

  • Last visited

Community Reputation

9

About roro69

Recent Profile Visitors

276 profile views
  1. MyCreaLogo

    Hello and thank you very much for all your kind message I will definitely update it, if some can help me code, or ideas on a cleaner graphic interface or other ideas I will be very happy I thank you in advance for the help provided Translation google sorry :)))
  2. MyCreaLogo

    Good evening; Here is a plugin that I use to create logos; I share it if you want to try it. On the other hand it is in French, if really you find it interesting I will try to translate it. For the plugin you can add as much annotation as you want to your image, then to apply an effect to your text you have to be careful that it is selecting :: The plugin is in Effect ----> CreaText ------> CreaLogo There it is, thanks Rogers.dll
  3. Hello ; someone would have it the start of the discussion file( Kerned text plugin) ; because the link is no longer valid . thank you very much
  4. Drop down list font

    Hello Thank you very much for your answers It's a shame because with fontname combo CodeLab; it is obliged to load the style one by one to see the result style font in the canvas. Too bad I will pass visual studio and event combo DrawItem Thank you for help
  5. Hello , Is it possible in the Drop down list fontname of CodeLab .; can draw like the paint net dropdown list fontname I would like in the plugin that I have tried to make the Drop down list like this If it is not possible ; I will do my plugin in visual studio but I find it a bit complicated create plugin with Visual studio I started my visual studio code like this: private void MonEffetConfigDialog_Load(object sender, EventArgs e) { this.MaCombo1.DrawMode = DrawMode.OwnerDrawFixed; this.MaCombo1.ItemHeight = 18; this.MaCombo1.DrawItem += new DrawItemEventHandler(this.MaCombo2_DrawItem); InstalledFontCollection MesPolicesInstalle = new InstalledFontCollection(); FontFamily[] FontFamille = MesPolicesInstalle.Families; FontFamily[] MonTableau = FontFamille; for (int i = 0; i < MonTableau.Length; i++) { FontFamily FontFamille1 = MonTableau[i]; if (FontFamille1.IsStyleAvailable(FontStyle.Regular)) { this.Macombo1.Items.Add(FontFamille1.Name); } } } private void MaCombo2_DrawItem(object sender, DrawItemEventArgs e) { e.DrawBackground(); ComboBox Macombo = (ComboBox)sender; string texte = (e.Index > -1) ? Macombo.Items[e.Index].ToString() : Macombo.Text; Font Police = new Font(texte, Macombo.Font.Size); Brush Pinceau = new SolidBrush(e.ForeColor); float fl = ((float)e.Bounds.Height - e.Graphics.MeasureString(texte, Police).Height) / 2f; e.Graphics.DrawString(text, font, brush, (float)e.Bounds.X, (float)e.Bounds.Y +fl); Police.Dispose(); Pinceau.Dispose(); e.DrawFocusRectangle(); } But I preferred to make my plugin with codelab. Thank you very much for your answers and assistance
  6. PixelCounter 2

    Hello if you want you can try this plugin http://forums.getpaint.net/index.php?/topic/106698-calcule-book-folding-pattern/
  7. change space letter

    Hello Thank you for your answers I tried but the result is not good; I tried going through a rather strinbuilder dessinner and a letter at a time and make a difference as I want Thank you for the help provided and the time spent
  8. change space letter

    Hello Yes I create a text effect plugins; and I wanted in my plugin manage the spacing of the letters; here is the code already implemented: code for transform text and drawtext // Write and transformation text g.ScaleTransform(Amount7, Amount8, System.Drawing.Drawing2D.MatrixOrder.Append); g.TranslateTransform(cx, cy,System.Drawing.Drawing2D.MatrixOrder.Append); StringFormat string_format = new StringFormat(); string_format.Alignment = StringAlignment.Center; string_format.LineAlignment = StringAlignment.Center; g.DrawString(Amount1, SelectedFont, Brush1, 0, 0, string_format); Thank you for their time and assistance provided :
  9. change space letter

    Hello thank you for your answers Too bad the topic and was moved because I would really like to know the code to achieve this. I repecte Decision Too bad the plugin link does not work for downloaded. Thank you for the help and time spent
  10. Hello Thanks to this excellent forum and assistance I could create plugin for drawing text on the canvas; and now I want that when I use certain Font; I can reduce the spacing (Kerning Font) between each letter. Thank you for the help provided and the time spent.
  11. codelab code excel files

    Hello eli Voici :http://forums.getpaint.net/index.php?/topic/106698-calcule-book-folding-pattern/
  12. Hello This plugin is used to calculate the pattern's books folded. It's like the plugin pixel count; just that the calculation is made only for 1 folding per page. The result is saved in an Excel workbook. Error You aren't permitted to upload this kind of file (°)) I placed it in effect render PatronLivre.zip
  13. codelab code excel files

    Hello eli Yes it's for used pour calculer patron livre plié
  14. codelab code excel files

    Good evening Thank you for your help my code works fine; the problem was the icon file. If anyone here interested here is the code to write to a file excel to count pixel (This is not an effect plugin) ..... using System; using System.Text; using System.Windows; using System.Reflection; using System.Windows.Forms; using PaintDotNet; using PaintDotNet.Effects; using PaintDotNet.IndirectUI; using PaintDotNet.PropertySystem; using System.Collections.Generic; using System.Drawing; using System.Drawing.Text; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using IntSliderControl = System.Int32; using TextboxControl = System.String; using Microsoft.Office.Interop; namespace PatronLivre { public class PluginSupportInfo : IPluginSupportInfo { public string Author { get { return ((AssemblyCopyrightAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]).Copyright; } } public string Copyright { get { return ((AssemblyDescriptionAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0]).Description; } } public string DisplayName { get { return ((AssemblyProductAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0]).Product; } } public Version Version { get { return base.GetType().Assembly.GetName().Version; } } public Uri WebsiteUri { get { return new Uri("http://www.getpaint.net/redirect/plugins.html"); } } } [PluginSupportInfo(typeof(PluginSupportInfo), DisplayName = "CalcPat+")] [EffectCategory(EffectCategory.Effect)] public class MonEffetEffectPlugin : PropertyBasedEffect { public static string StaticName { get { return "CalculPatron"; } } public static Bitmap StaticIcon { get { return PatronLivreEffect.Properties.Resources.EffectPluginIcon; } } public static string SubmenuName { get { return SubmenuNames.Render; // Programmer's chosen default } } public MonEffetEffectPlugin() : base(StaticName, StaticIcon, SubmenuName, EffectFlags.Configurable) { instanceSeed = unchecked((int)DateTime.Now.Ticks); } public enum PropertyNames { Amount1, Amount2, Amount3 } [ThreadStatic] private static Random RandomNumber; private int randomSeed; private int instanceSeed; protected override PropertyCollection OnCreatePropertyCollection() { List<Property> props = new List<Property>(); props.Add(new Int32Property(PropertyNames.Amount1, 0, 0, 1000)); props.Add(new StringProperty(PropertyNames.Amount2, "", 255)); props.Add(new Int32Property(PropertyNames.Amount3, 0, 0, 255)); return new PropertyCollection(props); } protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.Amount1, ControlInfoPropertyNames.DisplayName, "Nombre Page Livre"); configUI.SetPropertyControlValue(PropertyNames.Amount2, ControlInfoPropertyNames.DisplayName, "Nom du Patron"); configUI.SetPropertyControlValue(PropertyNames.Amount3, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlType(PropertyNames.Amount3, PropertyControlType.IncrementButton); configUI.SetPropertyControlValue(PropertyNames.Amount3, ControlInfoPropertyNames.ButtonText, "Sauve Patron"); return configUI; } protected override void OnSetRenderInfo(PropertyBasedEffectConfigToken newToken, RenderArgs dstArgs, RenderArgs srcArgs) { Amount1 = newToken.GetProperty<Int32Property>(PropertyNames.Amount1).Value; Amount2 = newToken.GetProperty<StringProperty>(PropertyNames.Amount2).Value; Amount3 = (byte)newToken.GetProperty<Int32Property>(PropertyNames.Amount3).Value; randomSeed = Amount3; base.OnSetRenderInfo(newToken, dstArgs, srcArgs); } protected override void OnCustomizeConfigUIWindowProperties(PropertyCollection props) { // Change the effect's window title props[ControlInfoPropertyNames.WindowTitle].Value = "CalculPatron"; base.OnCustomizeConfigUIWindowProperties(props); } protected override unsafe void OnRender(Rectangle[] rois, int startIndex, int length) { if (length == 0) return; RandomNumber = GetRandomNumberGenerator(rois, startIndex); for (int i = startIndex; i < startIndex + length; ++i) { Render(DstArgs.Surface, SrcArgs.Surface, rois[i]); } } private Random GetRandomNumberGenerator(Rectangle[] rois, int startIndex) { Rectangle roi = rois[startIndex]; return new Random(instanceSeed ^ (randomSeed << 16) ^ (roi.X << 8) ^ roi.Y); } #region User Entered Code // Name: // Submenu: // Author: // Title: // Version: // Desc: // Keywords: // URL: // Help: #region UICode IntSliderControl Amount1 = 0; // [0,1000] Nombre Page Livre TextboxControl Amount2 = ""; // [0,255] Nom du Patron byte Amount3 = 0; // [255] Sauve Patron #endregion byte LastButton = 0; String cboard; public struct Folds { public double a, b, c, d; public Folds(double p1, double p2, double p3, double p4) { a = p1; b = p2; c = p3; d = p4; } } public void SaveImages() { System.Windows.Forms.SaveFileDialog SaveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); string fp = Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); SaveFileDialog1.InitialDirectory = fp; SaveFileDialog1.Filter = "Text file (*.txt)|*.txt"; SaveFileDialog1.FilterIndex = 1; SaveFileDialog1.RestoreDirectory = false; if (SaveFileDialog1.ShowDialog() == DialogResult.OK) { cboard = SaveFileDialog1.FileName; } else { cboard = String.Empty; } } // Here is the main render loop function void Render(Surface dst, Surface src, Rectangle rect) { if (!IsCancelRequested) { Rectangle sel = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); dst.CopySurface(src, sel.Location, sel); //========================= SignalCancelRequest(); if (LastButton != Amount3) { LastButton = Amount3; System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(SaveImages)); t.SetApartmentState(System.Threading.ApartmentState.STA); t.Start(); t.Join(); Application.DoEvents(); if (cboard != String.Empty) { //try { Folds[] folds = new Folds[0]; System.IO.StreamWriter pc = new System.IO.StreamWriter(cboard, false); pc.WriteLine("Nom du patron:" + Amount2); pc.WriteLine("----------------------------------------------"); pc.Close(); GC.Collect(); Microsoft.Office.Interop.Excel.Application oXL; Microsoft.Office.Interop.Excel._Workbook oWB; Microsoft.Office.Interop.Excel._Worksheet oSheet; object misvalue = System.Reflection.Missing.Value; //Demarre excel oXL = new Microsoft.Office.Interop.Excel.Application(); oXL.Visible = false; //Nouveau classeur oWB = (Microsoft.Office.Interop.Excel._Workbook)(oXL.Workbooks.Add(Missing.Value)); oSheet = (Microsoft.Office.Interop.Excel._Worksheet)oWB.ActiveSheet; //Ajouter les entete de cellule oSheet.Cells[1, 1] = "Nom Patron"; oSheet.Cells[1, 2] = Amount2; oSheet.Cells[2, 1] = "Page"; oSheet.Cells[2, 2] = "Haut"; oSheet.Cells[2, 3] = "Bas"; for (int i = sel.Left; i < sel.Right; i++) { double toppix = 0; double pixlength = 0; for (int y = sel.Top; y < sel.Bottom; y++) { ColorBgra CP = src.GetBilinearSample(i, y); int total = CP.R + CP.G + CP.B; if (toppix == 0) { if (total < 765) { toppix = y; pixlength = 1; } } else { if (total < 765) { pixlength++; } else { Array.Resize(ref folds, folds.Length + 1); folds[folds.Length - 1] = new Folds(i, (toppix - 1) / 10, (pixlength + toppix) / 10, 0); toppix = 0; pixlength = 0; } } } } int x = 0; for (int i = 1; i <= folds.Length - 1; i++) { if (folds[i].a == folds[i - 1].a) { folds[x].d = folds[x].d + 1; } else { x = i; folds[x].d = folds[x].d + 1; } } int p = (Amount1 - (folds.Length * 2)) / 2; int ligne = 2; for (int i = 1; i <= folds.Length - 1; i++) { if (folds[i].d == 0) { folds[i].d = folds[i - 1].d; } if ((folds[i].a + folds[i].d + i) % folds[i].d == 0) { p = p + 2; ligne = ligne + 1; System.IO.StreamWriter pc2 = new System.IO.StreamWriter(cboard, true); pc2.WriteLine("Pages : " + p + "| " + "Haut: " + folds[i].b + " cm" + " | " + "Bas: " + folds[i].c + " cm"); pc2.WriteLine("----------------------------------------------"); pc2.Close(); oSheet.Cells[ligne, 1] = p; oSheet.Cells[ligne, 2] = folds[i].b; oSheet.Cells[ligne, 3] = folds[i].c; } } oSheet.UsedRange.HorizontalAlignment = Microsoft.Office.Interop.Excel.XlVAlign.xlVAlignCenter; oXL.UserControl = false; oWB.SaveAs(Amount2, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault, Type.Missing, Type.Missing, false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); oWB.Close(); oXL.Quit(); System.Runtime.InteropServices.Marshal.ReleaseComObject(oXL); System.Runtime.InteropServices.Marshal.ReleaseComObject(oWB); System.Runtime.InteropServices.Marshal.ReleaseComObject(oSheet); oSheet = null; oWB = null; oXL = null; GC.Collect(); } //}catch(Exception e){} }//cboard }//last button } #endregion } } Thank you for your help and time spent
  15. codelab code excel files

    Hello Sorry for the delay in replying; it was super helpful to have me answer ainsi.Je went t through visual studio to create my plugin, I debug (like here : http://forums.getpaint.net/index.php?/topic/4209-how-to-debug-your-plugin/)and built my dll; but it does not load in net paint .: Should I change the framework? (I work with the framework 4.5) Thank you for your answers and time spent. Sorry for my English ; I am French and I have a little trouble with English