Back to index

scribus-ng  1.3.4.dfsg+svn20071115
cwdialog.cpp
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 
00008 #include "cwdialog.h"
00009 #include "cwdialog.moc"
00010 
00011 #include <qvariant.h>
00012 #include <qcombobox.h>
00013 #include <qheader.h>
00014 #include <qlistview.h>
00015 #include <qlistbox.h>
00016 #include <qlayout.h>
00017 #include <qtooltip.h>
00018 #include <qwhatsthis.h>
00019 #include <qpushbutton.h>
00020 #include <qspinbox.h>
00021 #include <qpainter.h>
00022 #include <qmenubar.h>
00023 #include <qgroupbox.h>
00024 #include <qslider.h>
00025 #include <qtabwidget.h>
00026 #include <qtable.h>
00027 
00028 #include "prefsmanager.h"
00029 #include "commonstrings.h"
00030 #include "cmykfw.h"
00031 #include "prefsfile.h"
00032 #include "mpalette.h"
00033 #include "colorblind.h"
00034 #include "colorutil.h"
00035 #include "colorlistbox.h"
00036 #include "sccolorengine.h"
00037 
00038 CWDialog::CWDialog(QWidget* parent, ScribusDoc* doc, const char* name, bool modal, WFlags fl)
00039        : CWDialogBase (parent, name, modal, fl),
00040          m_Doc(doc)
00041 {
00042        int h, s, v;
00043        ScColor color;
00044        QString colorName;
00045        connectSlots(false);
00046        // setup combobox
00047        typeCombo->insertItem(colorWheel->getTypeDescription(colorWheel->Monochromatic), colorWheel->Monochromatic);
00048        typeCombo->insertItem(colorWheel->getTypeDescription(colorWheel->Analogous), colorWheel->Analogous);
00049        typeCombo->insertItem(colorWheel->getTypeDescription(colorWheel->Complementary), colorWheel->Complementary);
00050        typeCombo->insertItem(colorWheel->getTypeDescription(colorWheel->Split), colorWheel->Split);
00051        typeCombo->insertItem(colorWheel->getTypeDescription(colorWheel->Triadic), colorWheel->Triadic);
00052        typeCombo->insertItem(colorWheel->getTypeDescription(colorWheel->Tetradic), colorWheel->Tetradic);
00053        // defects
00054        defectCombo->insertItem(CommonStrings::trVisionNormal);
00055        defectCombo->insertItem(CommonStrings::trVisionProtanopia);
00056        defectCombo->insertItem(CommonStrings::trVisionDeuteranopia);
00057        defectCombo->insertItem(CommonStrings::trVisionTritanopia);
00058        defectCombo->insertItem(CommonStrings::trVisionFullColorBlind);
00059        // document colors
00060        documentColorList->updateBox(m_Doc->PageColors, ColorListBox::fancyPixmap);
00061        // preferences
00062        prefs = PrefsManager::instance()->prefsFile->getPluginContext("colorwheel");
00063        typeCombo->setCurrentItem(prefs->getInt("cw_type", 0));
00064        angleSpin->setValue(prefs->getInt("cw_angle", 15));
00065        colorWheel->currentDoc = m_Doc;
00066        colorWheel->angle = angleSpin->value();
00067        colorWheel->baseAngle = prefs->getInt("cw_baseangle", 0);
00068        colorspaceTab->setCurrentPage(prefs->getInt("cw_space", 0));
00069        color.setNamedColor(prefs->get("cw_color", "#00000000"));
00070        // Handle color previously selected in the document tab
00071        if (colorspaceTab->currentPage() == tabDocument)
00072        {
00073               colorName = prefs->get("cw_colorname", "");
00074               if (!colorName.isEmpty() && m_Doc->PageColors.contains(colorName))
00075                      color = m_Doc->PageColors[colorName];
00076               else
00077                      color.setColorRGB(0, 0, 0); //Trigger use of defaults
00078        }
00079        // Handle achromatic colors
00080        QColor rgb = ScColorEngine::getRGBColor(color, m_Doc);
00081        rgb.getHsv(&h, &s, &v);
00082        if (h == -1)
00083        {   // Reset to defaults
00084               colorWheel->baseAngle = 0;
00085               colorWheel->currentColorSpace = colorModelCMYK;
00086               colorWheel->actualColor = colorWheel->colorByAngle(0);
00087               colorspaceTab->setCurrentPage(0);
00088        }
00089        else if (colorspaceTab->currentPage() == tabDocument)
00090        {
00091               colorWheel->actualColor = color;
00092               documentColorList->setCurrentItem(documentColorList->findItem(colorName));
00093        }
00094        else
00095               colorWheel->actualColor = color;
00096 
00097        resize(QSize(prefs->getInt("cw_width", 640),
00098                  prefs->getInt("cw_height", 480)).expandedTo(minimumSizeHint()));
00099        previewLabel->resize(prefs->getInt("cw_samplex", 300), prefs->getInt("cw_sampley", 100));
00100               
00101        // setup
00102        colorspaceTab_currentChanged(colorspaceTab->currentPage());
00103        currentColorTable->horizontalHeader()->hide();
00104        currentColorTable->setTopMargin(0);
00105        currentColorTable->setNumCols(5);
00106 
00107        // signals and slots that cannot be in ui file
00108        connect(colorWheel, SIGNAL(clicked(int, const QPoint&)),
00109                      this, SLOT(colorWheel_clicked(int, const QPoint&)));
00110        connect(documentColorList, SIGNAL(currentChanged(QListBoxItem *)),
00111                      this, SLOT(documentColorList_currentChanged(QListBoxItem *)));
00112        connect(colorList, SIGNAL(currentChanged(QListBoxItem *)),
00113                      this, SLOT(colorList_currentChanged(QListBoxItem *)));
00114        connectSlots(true);
00115 }
00116 
00117 CWDialog::~CWDialog()
00118 {
00119        // preferences
00120        QString colorName = (colorspaceTab->currentPage() == tabDocument) ? documentColorList->currentText() : "";
00121        prefs->set("cw_type", typeCombo->currentItem());
00122        prefs->set("cw_angle", angleSpin->value());
00123        prefs->set("cw_baseangle", colorWheel->baseAngle);
00124        prefs->set("cw_color", colorWheel->actualColor.name());
00125        prefs->set("cw_colorname", colorName);
00126        prefs->set("cw_space", colorspaceTab->currentPageIndex());
00127        // GUI settings
00128        prefs->set("cw_width", width());
00129        prefs->set("cw_height", height());
00130        prefs->set("cw_samplex", previewLabel->width());
00131        prefs->set("cw_sampley", previewLabel->height());
00132 }
00133 
00134 void CWDialog::connectSlots(bool conn)
00135 {
00136        if (conn)
00137        {
00138               connect( cSpin, SIGNAL( valueChanged(int) ), this, SLOT( cSpin_valueChanged(int) ) );
00139               connect( mSpin, SIGNAL( valueChanged(int) ), this, SLOT( mSpin_valueChanged(int) ) );
00140               connect( ySpin, SIGNAL( valueChanged(int) ), this, SLOT( ySpin_valueChanged(int) ) );
00141               connect( kSpin, SIGNAL( valueChanged(int) ), this, SLOT( kSpin_valueChanged(int) ) );
00142               connect( rSpin, SIGNAL( valueChanged(int) ), this, SLOT( rSpin_valueChanged(int) ) );
00143               connect( gSpin, SIGNAL( valueChanged(int) ), this, SLOT( gSpin_valueChanged(int) ) );
00144               connect( bSpin, SIGNAL( valueChanged(int) ), this, SLOT( bSpin_valueChanged(int) ) );
00145               connect( hSpin, SIGNAL( valueChanged(int) ), this, SLOT( hSpin_valueChanged(int) ) );
00146               connect( sSpin, SIGNAL( valueChanged(int) ), this, SLOT( sSpin_valueChanged(int) ) );
00147               connect( vSpin, SIGNAL( valueChanged(int) ), this, SLOT( vSpin_valueChanged(int) ) );
00148        }
00149        else
00150        {
00151               disconnect( cSpin, SIGNAL( valueChanged(int) ), this, SLOT( cSpin_valueChanged(int) ) );
00152               disconnect( mSpin, SIGNAL( valueChanged(int) ), this, SLOT( mSpin_valueChanged(int) ) );
00153               disconnect( ySpin, SIGNAL( valueChanged(int) ), this, SLOT( ySpin_valueChanged(int) ) );
00154               disconnect( kSpin, SIGNAL( valueChanged(int) ), this, SLOT( kSpin_valueChanged(int) ) );
00155               disconnect( rSpin, SIGNAL( valueChanged(int) ), this, SLOT( rSpin_valueChanged(int) ) );
00156               disconnect( gSpin, SIGNAL( valueChanged(int) ), this, SLOT( gSpin_valueChanged(int) ) );
00157               disconnect( bSpin, SIGNAL( valueChanged(int) ), this, SLOT( bSpin_valueChanged(int) ) );
00158               disconnect( hSpin, SIGNAL( valueChanged(int) ), this, SLOT( hSpin_valueChanged(int) ) );
00159               disconnect( sSpin, SIGNAL( valueChanged(int) ), this, SLOT( sSpin_valueChanged(int) ) );
00160               disconnect( vSpin, SIGNAL( valueChanged(int) ), this, SLOT( vSpin_valueChanged(int) ) );
00161        }
00162 }
00163 
00164 void CWDialog::documentColorList_currentChanged(QListBoxItem *item)
00165 {
00166        if (!item)
00167               return;
00168        ScColor c(m_Doc->PageColors[documentColorList->currentText()]);
00169        colorWheel->currentColorSpace = c.getColorModel();
00170        setupColorComponents();
00171 }
00172 
00173 void CWDialog::colorspaceTab_currentChanged( QWidget * tab)
00174 {
00175        if (tab == tabCMYK)
00176               colorWheel->currentColorSpace = colorModelCMYK;
00177        if (tab == tabRGB)
00178               colorWheel->currentColorSpace = colorModelRGB;
00179        if (tab == tabDocument)
00180        {
00181               if (documentColorList->currentItem() == -1)
00182                      documentColorList->setSelected(0, true);
00183               documentColorList_currentChanged(documentColorList->item(documentColorList->currentItem()));
00184        }
00185        processColors(typeCombo->currentItem(), true);
00186 }
00187 
00188 void CWDialog::typeCombo_activated(int index)
00189 {
00190        processColors(index, false);
00191 }
00192 
00193 void CWDialog::processColors(int index, bool updateSpins)
00194 {
00195        bool angEnable = false;
00196        //colorList->clear();
00197        if (index == colorWheel->Monochromatic)
00198               colorWheel->currentType = colorWheel->Monochromatic;
00199        if (index == colorWheel->Analogous)
00200        {
00201               angEnable = true;
00202               colorWheel->currentType = colorWheel->Analogous;
00203        }
00204        if (index == colorWheel->Complementary)
00205               colorWheel->currentType = colorWheel->Complementary;
00206        if (index == colorWheel->Split)
00207        {
00208               angEnable = true;
00209               colorWheel->currentType = colorWheel->Split;
00210        }
00211        if (index == colorWheel->Triadic)
00212               colorWheel->currentType = colorWheel->Triadic;
00213        if (index == colorWheel->Tetradic)
00214        {
00215               angEnable = true;
00216               colorWheel->currentType = colorWheel->Tetradic;
00217        }
00218        angleSpin->setEnabled(angEnable);
00219        angleLabel->setEnabled(angEnable);
00220        colorWheel->makeColors();
00221        fillColorList();
00222        setPreview();
00223        if (updateSpins)
00224        {
00225 //            setupFromColor(colorWheel->actualColor);
00226               setupRGBComponent(colorWheel->actualColor);
00227               setupCMYKComponent(colorWheel->actualColor);
00228               setupHSVComponent(colorWheel->actualColor);
00229        }
00230        updateNamedLabels();
00231 }
00232 
00233 void CWDialog::colorWheel_clicked(int, const QPoint&)
00234 {
00235        processColors(typeCombo->currentItem(), true);
00236 }
00237 
00238 void CWDialog::angleSpin_valueChanged(int value)
00239 {
00240        colorWheel->angle = value;
00241        processColors(typeCombo->currentItem(), false);
00242 }
00243 
00244 void CWDialog::setPreview()
00245 {
00246        int x = previewLabel->width();
00247        int y = previewLabel->height();
00248        QValueList<ScColor> cols = colorWheel->colorList.values();
00249        int xstep = x / cols.count();
00250        QPixmap pm = QPixmap(x, y);
00251        QPainter *p = new QPainter(&pm);
00252        QFontMetrics fm = p->fontMetrics();
00253 
00254        pm.fill(Qt::white);
00255        p->setPen(Qt::white);
00256        p->drawRect(0, 0, x, y);
00257        QColor c;
00258        for (uint i = 0; i < cols.count(); ++i)
00259        {
00260               //c = computeDefect(cols[i].getRGBColor());
00261               c = computeDefect( ScColorEngine::getDisplayColor(cols[i], m_Doc) );
00262               p->setPen(c);
00263               p->setBrush(c);
00264               p->drawRect(i * xstep, 0, xstep, y);
00265        }
00266        p->setPen(Qt::black);
00267        p->setBrush(Qt::black);
00268        p->drawText(15, 5 + fm.height(), "Lorem ipsum dolor sit amet");
00269        p->setPen(Qt::white);
00270        p->setBrush(Qt::white);
00271        p->drawText(90, y - 5 - fm.height(), "Lorem ipsum dolor sit amet");
00272        p->end();
00273        delete(p);
00274        previewLabel->clear();
00275        previewLabel->setPixmap(pm);
00276 }
00277 
00278 QColor CWDialog::computeDefect(QColor c)
00279 {
00280        if (defectCombo->currentItem() == VisionDefectColor::normalVision)
00281               return c;
00282        VisionDefectColor *defect = new VisionDefectColor(c);
00283        defect->deficiency = defectCombo->currentItem();
00284        defect->convertDefect();
00285        QColor nc = defect->getColor();
00286        delete defect;
00287        return nc;
00288 }
00289 
00290 void CWDialog::fillColorList()
00291 {
00292        uint ix = colorList->currentItem();
00293        colorList->updateBox(colorWheel->colorList, ColorListBox::fancyPixmap);
00294        QListBoxItem *item = colorList->findItem(colorWheel->trBaseColor);
00295        if (item->prev())
00296        {
00297               colorList->takeItem(item);
00298               colorList->insertItem(item, 0);
00299        }
00300        colorList->setCurrentItem(ix > colorList->count() ? 0 : ix);
00301 }
00302 
00303 void CWDialog::defectCombo_activated(int)
00304 {
00305        setPreview();
00306 }
00307 
00308 void CWDialog::addButton_clicked()
00309 {
00310        QString status("<qt><h2>" + tr("Merging colors") + "</h2><p>");
00311        bool err = false;
00312        for (ColorList::iterator it = colorWheel->colorList.begin(); it != colorWheel->colorList.end(); ++it)
00313        {
00314               if (m_Doc->PageColors.contains(it.key()))
00315               {
00316                      status += "<b>" + tr("Error: ") + "</b>" + tr("Color %1 exists already!").arg(it.key()) + "<br/>";
00317                      err = true;
00318               }
00319               else
00320               {
00321                      status += tr("Color %1 appended.").arg(it.key()) + "<br/>";
00322                      m_Doc->PageColors[it.key()] = it.data();
00323               }
00324        }
00325        status += "<p>" + tr("Now opening the color manager.") + "</p></qt>";
00326        if (err)
00327        {
00328               QMessageBox::information(this, tr("Color Merging"), status);
00329               m_Doc->scMW()->slotEditColors();
00330               return;
00331        }
00332        m_Doc->scMW()->propertiesPalette->updateColorList();
00333        accept();
00334 }
00335 
00336 void CWDialog::replaceButton_clicked()
00337 {
00338        for (ColorList::iterator it = colorWheel->colorList.begin(); it != colorWheel->colorList.end(); ++it)
00339        {
00340               m_Doc->PageColors[it.key()] = it.data();
00341        }
00342        m_Doc->scMW()->propertiesPalette->updateColorList();
00343        accept();
00344 }
00345 
00346 void CWDialog::cancelButton_clicked()
00347 {
00348        reject();
00349 }
00350 
00351 void CWDialog::cSpin_valueChanged( int )
00352 {
00353        setupColorComponents();
00354 }
00355 
00356 void CWDialog::mSpin_valueChanged( int )
00357 {
00358        setupColorComponents();
00359 }
00360 
00361 void CWDialog::ySpin_valueChanged( int )
00362 {
00363        setupColorComponents();
00364 }
00365 
00366 void CWDialog::kSpin_valueChanged( int )
00367 {
00368        setupColorComponents();
00369 }
00370 
00371 void CWDialog::rSpin_valueChanged( int )
00372 {
00373        setupColorComponents();
00374 }
00375 
00376 void CWDialog::gSpin_valueChanged( int )
00377 {
00378        setupColorComponents();
00379 }
00380 
00381 void CWDialog::bSpin_valueChanged( int )
00382 {
00383        setupColorComponents();
00384 }
00385 
00386 void CWDialog::hSpin_valueChanged( int )
00387 {
00388        setupColorComponents();
00389 }
00390 
00391 void CWDialog::sSpin_valueChanged( int )
00392 {
00393        setupColorComponents();
00394 }
00395 
00396 void CWDialog::vSpin_valueChanged( int )
00397 {
00398        setupColorComponents();
00399 }
00400 
00401 void CWDialog::setupRGBComponent(ScColor col)
00402 {
00403        RGBColor rgb;
00404        ScColorEngine::getRGBValues(col, m_Doc, rgb);
00405        connectSlots(false);
00406        rSpin->setValue(rgb.r);
00407        gSpin->setValue(rgb.g);
00408        bSpin->setValue(rgb.b);
00409        connectSlots(true);
00410 }
00411 
00412 void CWDialog::setupCMYKComponent(ScColor col)
00413 {
00414        CMYKColor cmyk;
00415        ScColorEngine::getCMYKValues(col, m_Doc, cmyk);
00416        connectSlots(false);
00417        cSpin->setValue(qRound(cmyk.c / 2.55));
00418        mSpin->setValue(qRound(cmyk.m / 2.55));
00419        ySpin->setValue(qRound(cmyk.y / 2.55));
00420        kSpin->setValue(qRound(cmyk.k / 2.55));
00421        connectSlots(true);
00422 }
00423 
00424 void CWDialog::setupHSVComponent(ScColor col)
00425 {
00426        int h, s, v;
00427        QColor qc(ScColorEngine::getRGBColor(col, m_Doc));
00428        qc.getHsv(&h, &s, &v);
00429        connectSlots(false);
00430        hSpin->setValue(h);
00431        sSpin->setValue(s);
00432        vSpin->setValue(v);
00433        connectSlots(true);
00434 }
00435 
00436 void CWDialog::setupColorComponents()
00437 {
00438        ScColor c;
00439        if (colorspaceTab->currentPage() == tabCMYK)
00440        {
00441               c = ScColor(qRound(cSpin->value() * 2.55), qRound(mSpin->value() * 2.55),
00442                                    qRound(ySpin->value() * 2.55), qRound(kSpin->value() * 2.55));
00443               c = ScColorEngine::convertToModel(c, m_Doc, colorModelCMYK);
00444               setupRGBComponent(c);
00445               setupHSVComponent(c);
00446        }
00447        if (colorspaceTab->currentPage() == tabRGB)
00448        {
00449               c = ScColor(rSpin->value(), gSpin->value(), bSpin->value());
00450               c = ScColorEngine::convertToModel(c, m_Doc, colorModelRGB);
00451               setupCMYKComponent(c);
00452               setupHSVComponent(c);
00453        }
00454        if (colorspaceTab->currentPage() == tabHSV)
00455        {
00456               QColor qc;
00457               qc.setHsv(hSpin->value(), sSpin->value(), vSpin->value());
00458               c.fromQColor(qc);
00459               c = ScColorEngine::convertToModel(c, m_Doc, colorModelRGB);
00460               setupCMYKComponent(c);
00461               setupRGBComponent(c);
00462        }
00463        if (colorspaceTab->currentPage() == tabDocument)
00464        {
00465               c = m_Doc->PageColors[documentColorList->currentText()];
00466               setupRGBComponent(c);
00467               setupCMYKComponent(c);
00468               setupHSVComponent(c);
00469        }
00470 
00471        if (colorWheel->recomputeColor(c))
00472               processColors(typeCombo->currentItem(), false);
00473        else
00474        {
00475               colorList->clear();
00476               QMessageBox::information(this, caption(),
00477                                                          "<qt>" + tr("Unable to find the requested color. "
00478                                                                        "You have probably selected black, gray or white. "
00479                                                                        "There is no way to process this color.") + "</qt>");
00480        }
00481        updateNamedLabels();
00482 }
00483 
00484 void CWDialog::updateNamedLabels()
00485 {
00486        cmykLabel->setText(colorWheel->actualColor.nameCMYK(m_Doc));
00487        cmykLabel2->setText(colorWheel->actualColor.nameCMYK(m_Doc));
00488        rgbLabel->setText(colorWheel->actualColor.nameRGB(m_Doc));
00489        rgbLabel2->setText(colorWheel->actualColor.nameRGB(m_Doc));
00490        hsvLabel->setText(getHexHsv(colorWheel->actualColor));
00491        hsvLabel2->setText(getHexHsv(colorWheel->actualColor));
00492 }
00493 
00494 void CWDialog::colorList_currentChanged(QListBoxItem * item)
00495 {
00496        if (!item)
00497               return;
00498 
00499        // if it's base color we do not need to recompute it again
00500        if (item->text() == colorWheel->trBaseColor)
00501        {
00502               currentColorTable->setText(0, 4, cmykLabel->text());
00503               currentColorTable->setText(1, 4, rgbLabel->text());
00504               currentColorTable->setText(2, 4, hsvLabel->text());
00505               currentColorTable->setText(0, 0, cSpin->text());
00506               currentColorTable->setText(0, 1, mSpin->text());
00507               currentColorTable->setText(0, 2, ySpin->text());
00508               currentColorTable->setText(0, 3, kSpin->text());
00509               currentColorTable->setText(1, 0, rSpin->text());
00510               currentColorTable->setText(1, 1, gSpin->text());
00511               currentColorTable->setText(1, 2, bSpin->text());
00512               currentColorTable->setText(2, 0, hSpin->text());
00513               currentColorTable->setText(2, 1, sSpin->text());
00514               currentColorTable->setText(2, 2, vSpin->text());
00515 
00516        }
00517        else
00518        {
00519               ScColor col(colorWheel->colorList[item->text()]);
00520               currentColorTable->setText(0, 4, col.nameCMYK(m_Doc));
00521               currentColorTable->setText(1, 4, col.nameRGB(m_Doc));
00522               currentColorTable->setText(2, 4, getHexHsv(col));
00523               // components
00524               QString num;
00525               CMYKColor cmyk;
00526               ScColorEngine::getCMYKValues(col, m_Doc, cmyk);
00527               currentColorTable->setText(0, 0, num.setNum(cmyk.c));
00528               currentColorTable->setText(0, 1, num.setNum(cmyk.m));
00529               currentColorTable->setText(0, 2, num.setNum(cmyk.y));
00530               currentColorTable->setText(0, 3, num.setNum(cmyk.k));
00531               RGBColor rgb;
00532               ScColorEngine::getRGBValues(col, m_Doc, rgb);
00533               currentColorTable->setText(1, 0, num.setNum(rgb.r));
00534               currentColorTable->setText(1, 1, num.setNum(rgb.g));
00535               currentColorTable->setText(1, 2, num.setNum(rgb.b));
00536               int h, s, v;
00537               QColor hsvCol(ScColorEngine::getRGBColor(col, m_Doc));
00538               hsvCol.getHsv(&h, &s, &v);
00539               currentColorTable->setText(2, 0, num.setNum(h));
00540               currentColorTable->setText(2, 1, num.setNum(s));
00541               currentColorTable->setText(2, 2, num.setNum(v));
00542        }
00543        currentColorTable->adjustColumn(0);
00544        currentColorTable->adjustColumn(1);
00545        currentColorTable->adjustColumn(2);
00546        currentColorTable->adjustColumn(3);
00547        currentColorTable->adjustColumn(4);
00548 }
00549 
00550 QString CWDialog::getHexHsv(ScColor c)
00551 {
00552        int h, s, v;
00553        QColor hsvCol(ScColorEngine::getRGBColor(c, m_Doc));
00554        hsvCol.getHsv(&h, &s, &v);
00555        return QString("#%1%2%3").arg(h, 0, 16).arg(s, 0, 16).arg(v, 0, 16);
00556 }