lloydo
-
Posts
42 -
Joined
-
Last visited
Posts posted by lloydo
-
-
my result
-
GREAT TUT DUDE , SHOULD BECOME A PLUGIN!!!
Hey rick , if you see this , instead of stickying it, make it best tut :wink:
-
Code without error message BUT still not working due to bad programing:
int Amount1=72; //[1,360]How big is your box of chalk? void Render(Surface dst, Surface src, Rectangle rect) { double BaseColors = (double)Amount1; PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; double Q = 360 / BaseColors; double H = 0,S = 0,V = 0; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { if (selectionRegion.IsVisible(x, y)) { CurrentPixel = src[x,y]; H = Q * (double)Math.Round(H / Q); // Normalize Hue if (S > 0.15) // Compress Saturation { S = ((0.35 * (S - 0.15)) / (1.0 - 0.15)) + 0.15; } if (V > 0.05) // Compress Value { V = ((0.15 * (V - 0.05)) / (1.0 - 0.05)) + 0.85; } else // Near Black Pixels { S = 0; // turn them gray V += 0.75; } //EvanHSVtoRGB(H,S,V,ref CurrentPixel.R,ref CurrentPixel.G,ref CurrentPixel.; dst[x,y] = CurrentPixel; } } } }
1. Never use {} for function, it's only needed for groups of instructions.
2. Use () for all the functions.
3. Semi-column ';' is needed at the end of an instruction
4. S, V are always at 0! You need to affect them a value somewhere!
5. EvanHSVtoRGB isn't a built-in function, to use it, you have to add its code at the end.
6. I have added Amount1, that will allow you to have a slider when you will build the DLL.
Now please go on...
Ok the code is now perfect thanks to madjik ( thanks dude! ) the only thing is that access to my effects folder is denied and im on my administrator account...
-
By the way, your code looks very familiar...
http://boltbait.googlepages.com/pastel
You didn't do a very good job of copy-and-paste.
ok you found out i was editing your pastel source code
please dont ban me , please!!
-
void Render{Surface dst, Surface src, Rectangle rect}
{ // How big is your box of chalk?
double BaseColors = 72; // 1-360, step 1, Default = 72
PdnRegion selectionRegion = EnvironmentParameters.GetSelection{src.Bounds};
Rectangle selection = this.EnvironmentParameters.GetSelection{src.Bounds}.GetBoundsInt{};
ColorBgra CurrentPixel;
double Q = 360 / BaseColors;
double H = 0,S = 0,V = 0;
for(int y = rect.Top; y < rect.Bottom; y++}
{
for {int x = rect.Left; x < rect.Right; x++}
{
if {selectionRegion.IsVisible{x, y}}
CurrentPixel = src[x,y];
; {CurrentPixel.R,CurrentPixel.G,CurrentPixel.B,ref H,ref} S,ref V}; {CS1026}
H = Q*{double}Math.Round{H/Q}; // Normalize Hue
if {S > .15} // Compress Saturation
{
S = { {0.35*{S-0.15}} / {1.0-0.15} } + 0.15;
}
{V > 0.05} // Compress Value
{
V = { {0.15*{V-0.05}} / {1.0-0.05} } + 0.85;
} ;
else // Near Black Pixels
{
S = 0; // turn them gray
V += 0.75;
}
EvanHSVtoRGB(H,S,V,ref CurrentPixel.R,ref CurrentPixel.G,ref CurrentPixel.B};
dst[x,y] = CurrentPixel;
}
}
}
}
Just made more errors
Can you correct all the errors then send back to me?
-
void Render(Surface dst, Surface src, Rectangle rect) { // How big is your box of chalk? double BaseColors = 72; // 1-360, step 1, Default = 72 PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; double Q = 360 / BaseColors; double H = 0,S = 0,V = 0; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) ( if (selectionRegion.IsVisible(x, y)) CurrentPixel = src[x,y]; ; (CurrentPixel.R,CurrentPixel.G,CurrentPixel.B,ref H,ref) S,ref V); (CS1026) H = Q*(double)Math.Round(H/Q); // Normalize Hue if (S > .15) // Compress Saturation ( S = ( (0.35*(S-0.15)) / (1.0-0.15) ) + 0.15; ) if (V > 0.05) // Compress Value ( V = ( (0.15*(V-0.05)) / (1.0-0.05) ) + 0.85; ) ; else // Near Black Pixels { S = 0; // turn them gray V += 0.75; } EvanHSVtoRGB(H,S,V,ref CurrentPixel.R,ref CurrentPixel.G,ref CurrentPixel.; dst[x,y] = CurrentPixel; } } } }
-
type or namespace definition, or end of file expected (CS1002)What is the symbol you use at the end????I don't understand your question. Could you be more specific?
The "end" of what, exactly? What error are you seeing?
Do you know what this is?
-
What is the symbol you use at the end????
-
Hi , can anyone take the pastel plugin and change it into a chalk plugin which makes it look like images were drawn in chalk , bye! :wink:
-
Thanx man! Love that Fade functions (look @ my sig... or avatar )
check out my 2 images with the fade function
-
This is what i got. I experimented and managed to get 5 different coulours fading into each other
GREAT PLUGIN DUDE!!!
I also got this
-
Try taking the red eye CODELAB (SOURCE)
and changing it a bit and turning into a plugin
-
what i got after folloin the tut great tut :wink:
-
It shows up as white.....
-
-
-
-
How do you save the image of your PDN screen???
-
:?: :?: :?: :?: :?: :?: :?: how do i get screenshots in my posts?
the trouble is that i cant get the image of the screen
-
Bullet holes Tut (100% complete!!)
in Miscellaneous
Posted
nice tut ash , you should become a mod