Lines Matching refs:style

41 #include "style.h"
172 void CairoRenderContext::setStateForStyle(SPStyle const *style)
175 _state->opacity = SP_SCALE24_TO_FLOAT(style->opacity.value);
176 _state->has_overflow = (style->overflow.set && style->overflow.value != SP_CSS_OVERFLOW_VISIBLE);
177 _state->has_filtereffect = (style->filter.set != 0) ? TRUE : FALSE;
179 if (style->fill.isPaintserver() || style->stroke.isPaintserver())
184 && !style->fill.isNone()
185 && !style->stroke.isNone())
1168 if (hatch->style->overflow.computed == SP_CSS_OVERFLOW_VISIBLE) {
1322 CairoRenderContext::_setFillStyle(SPStyle const *const style, Geom::OptRect const &pbox)
1324 g_return_if_fail( !style->fill.set
1325 || style->fill.isColor()
1326 || style->fill.isPaintserver() );
1328 float alpha = SP_SCALE24_TO_FLOAT(style->fill_opacity.value);
1334 SPPaintServer const *paint_server = style->getFillPaintServer();
1337 g_assert(SP_IS_GRADIENT(SP_STYLE_FILL_SERVER(style))
1338 || SP_IS_PATTERN(SP_STYLE_FILL_SERVER(style))
1339 || dynamic_cast<SPHatch *>(SP_STYLE_FILL_SERVER(style)));
1346 } else if (style->fill.colorSet) {
1348 sp_color_get_rgb_floatv(&style->fill.value.color, rgb);
1353 g_assert(!style->fill.set
1361 CairoRenderContext::_setStrokeStyle(SPStyle const *style, Geom::OptRect const &pbox)
1363 float alpha = SP_SCALE24_TO_FLOAT(style->stroke_opacity.value);
1367 if (style->stroke.isColor() || (style->stroke.isPaintserver() && !style->getStrokePaintServer()->isValid())) {
1369 sp_color_get_rgb_floatv(&style->stroke.value.color, rgb);
1373 g_assert( style->stroke.isPaintserver()
1374 || SP_IS_GRADIENT(SP_STYLE_STROKE_SERVER(style))
1375 || SP_IS_PATTERN(SP_STYLE_STROKE_SERVER(style))
1376 || dynamic_cast<SPHatch *>(SP_STYLE_STROKE_SERVER(style)));
1378 cairo_pattern_t *pattern = _createPatternForPaintServer(SP_STYLE_STROKE_SERVER(style), pbox, alpha);
1386 if (!style->stroke_dasharray.values.empty())
1388 size_t ndashes = style->stroke_dasharray.values.size();
1391 dashes[i] = style->stroke_dasharray.values[i];
1393 cairo_set_dash(_cr, dashes, ndashes, style->stroke_dashoffset.value);
1399 cairo_set_line_width(_cr, style->stroke_width.computed);
1403 switch (style->stroke_linejoin.computed) {
1418 switch (style->stroke_linecap.computed) {
1430 cairo_set_miter_limit(_cr, MAX(1, style->stroke_miterlimit.value));
1460 CairoRenderContext::renderPathVector(Geom::PathVector const & pathv, SPStyle const *style, Geom::OptRect const &pbox, CairoPaintOrder order)
1468 addClipPath(pathv, &style->fill_rule);
1471 if (style->fill_rule.computed == SP_WIND_RULE_EVENODD) {
1482 bool no_fill = style->fill.isNone() || style->fill_opacity.value == 0 ||
1484 bool no_stroke = style->stroke.isNone() || style->stroke_width.computed < 1e-9 ||
1485 style->stroke_opacity.value == 0 || order == FILL_ONLY;
1499 if (style->fill_rule.computed == SP_WIND_RULE_EVENODD) {
1509 _setFillStyle(style, pbox);
1518 _setStrokeStyle(style, pbox);
1527 _setFillStyle(style, pbox);
1541 Geom::Affine const &image_transform, SPStyle const *style)
1579 if (style) {
1582 // style.h/style.cpp
1583 switch (style->image_rendering.computed) {
1651 std::vector<CairoGlyphInfo> const &glyphtext, SPStyle const *style)
1659 // double size = style->font_size.computed; /// \fixme why is this variable never used?
1705 if (style->fill_rule.computed == SP_WIND_RULE_EVENODD) {
1718 if (style->fill.isColor() || style->fill.isPaintserver()) {
1723 if (style->stroke.isColor() || style->stroke.isPaintserver()) {
1729 if ( (style->paint_order.layer[0] == SP_CSS_PAINT_ORDER_STROKE &&
1730 style->paint_order.layer[1] == SP_CSS_PAINT_ORDER_FILL) ||
1732 (style->paint_order.layer[0] == SP_CSS_PAINT_ORDER_STROKE &&
1733 style->paint_order.layer[2] == SP_CSS_PAINT_ORDER_FILL) ||
1735 (style->paint_order.layer[1] == SP_CSS_PAINT_ORDER_STROKE &&
1736 style->paint_order.layer[2] == SP_CSS_PAINT_ORDER_FILL) ) {
1742 _setFillStyle(style, Geom::OptRect());
1757 _setStrokeStyle(style, Geom::OptRect());
1770 _setFillStyle(style, Geom::OptRect());
1864 c-file-style:"stroustrup"