void findMarks(jbyte* data, Count width,Count height) { int fillColor= 254; for ( Count y= height/8; y < 7*height/8; y++) { for ( Count x= width/8; x < 7*width/8; x++) { if ( get_color_value(data, x,y,width)== 255 ) { colorMark(data, width, height, x, y, fillColor); } } } }
void colorMark(jbyte* data, Count width, Count height, Count x, Count y, int fillColor) { set_color_value(data,x,y,width,fillColor); fillColor= 80; for (int delta_x= -1; delta_x <= 1; delta_x++) { for (int delta_y= -1; delta_y <= 1; delta_y++) { if ((delta_x != 0 || delta_y != 0)) { if (get_color_value(data,x+delta_x,y+delta_y,width) == 255) { colorMark(data,width,height,x+delta_x,y+delta_y,fillColor); } } } } }
void SpellChecker::buildMarkTag() { QTextCharFormat format; QColor colorMark("#FF0101"); colorMark = config_file.readColorEntry("ASpell", "Color", &colorMark); if (config_file.readBoolEntry("ASpell", "Bold", false)) format.setFontWeight(600); if (config_file.readBoolEntry("ASpell", "Italic", false)) format.setFontItalic(true); if (config_file.readBoolEntry("ASpell", "Underline", false)) { format.setFontUnderline(true); format.setUnderlineColor(colorMark); format.setUnderlineStyle(QTextCharFormat::SpellCheckUnderline); } format.setForeground(QBrush(colorMark)); Highlighter::setHighlightFormat(format); Highlighter::rehighlightAll(); }