X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ffreenet%2Fcaptcha%2Fsimplecaptcha.cpp;h=3753a12c637b9de8fa5fadebabf22d56fb2cb9fb;hb=9a14c0d9f7f7c319e539583b93664953764e83b7;hp=c84010fe48628183709db66aeb7810dfd94dae4f;hpb=175f098e7e712b839db433b93fe8649a402c6784;p=fms.git diff --git a/src/freenet/captcha/simplecaptcha.cpp b/src/freenet/captcha/simplecaptcha.cpp index c84010f..3753a12 100644 --- a/src/freenet/captcha/simplecaptcha.cpp +++ b/src/freenet/captcha/simplecaptcha.cpp @@ -3,6 +3,8 @@ #include "../../../include/freenet/captcha/easybmp/EasyBMP_Font.h" #include "../../../include/freenet/captcha/easybmp/EasyBMP_Geometry.h" +#include + #ifdef XMEM #include #endif @@ -10,7 +12,7 @@ void SimpleCaptcha::Generate() { BMP bmp; - int bmpwidth=100; + int bmpwidth=110; int bmpheight=50; RGBApixel lettercols[5]; std::string puzzlestring; @@ -51,16 +53,17 @@ void SimpleCaptcha::Generate() double endangle=(double)(rand()%360)*(3.14159/180); pixel.Red=100+(rand()%150); pixel.Green=100+(rand()%150); + pixel.Blue=100+(rand()%150); DrawArc(bmp,x1,y1,radius,startangle,endangle,pixel); } for(int i=0; i<5; i++) { // keep the colors dark - lettercols[i].Red=(rand()%200); - lettercols[i].Green=(rand()%200); - lettercols[i].Blue=(rand()%200); - // draw a line with the letter col + lettercols[i].Red=(rand()%150); + lettercols[i].Green=(rand()%150); + lettercols[i].Blue=(rand()%150); + // draw a line with the letter color DrawAALine(bmp,rand()%bmpwidth,rand()%bmpheight,rand()%bmpwidth,rand()%bmpheight,lettercols[i]); }