当前位置: 首页>>代码示例>>C++>>正文


C++ SVGFEImageElement类代码示例

本文整理汇总了C++中SVGFEImageElement的典型用法代码示例。如果您正苦于以下问题:C++ SVGFEImageElement类的具体用法?C++ SVGFEImageElement怎么用?C++ SVGFEImageElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SVGFEImageElement类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AttributeChanged

NS_IMETHODIMP
SVGFEImageFrame::AttributeChanged(int32_t  aNameSpaceID,
                                  nsIAtom* aAttribute,
                                  int32_t  aModType)
{
  SVGFEImageElement *element = static_cast<SVGFEImageElement*>(mContent);
  if (element->AttributeAffectsRendering(aNameSpaceID, aAttribute)) {
    nsSVGEffects::InvalidateRenderingObservers(this);
  }
  if (aNameSpaceID == kNameSpaceID_XLink &&
      aAttribute == nsGkAtoms::href) {

    // Prevent setting image.src by exiting early
    if (nsContentUtils::IsImageSrcSetDisabled()) {
      return NS_OK;
    }

    if (element->mStringAttributes[SVGFEImageElement::HREF].IsExplicitlySet()) {
      element->LoadSVGImage(true, true);
    } else {
      element->CancelImageRequests(true);
    }
  }

  return SVGFEImageFrameBase::AttributeChanged(aNameSpaceID,
                                                 aAttribute, aModType);
}
开发者ID:Web5design,项目名称:mozilla-central,代码行数:27,代码来源:SVGFEImageFrame.cpp

示例2: xmlspaceAttrSetter

static void xmlspaceAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    SVGFEImageElement* imp = V8SVGFEImageElement::toNative(info.Holder());
    V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
    imp->setXmlspace(v);
    return;
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:7,代码来源:V8SVGFEImageElement.cpp

示例3: MOZ_ASSERT

nsresult
SVGFEImageFrame::AttributeChanged(int32_t  aNameSpaceID,
                                  nsIAtom* aAttribute,
                                  int32_t  aModType)
{
  SVGFEImageElement *element = static_cast<SVGFEImageElement*>(mContent);
  if (element->AttributeAffectsRendering(aNameSpaceID, aAttribute)) {
    MOZ_ASSERT(GetParent()->GetType() == nsGkAtoms::svgFilterFrame,
               "Observers observe the filter, so that's what we must invalidate");
    nsSVGEffects::InvalidateDirectRenderingObservers(GetParent());
  }
  if ((aNameSpaceID == kNameSpaceID_XLink ||
       aNameSpaceID == kNameSpaceID_None) &&
      aAttribute == nsGkAtoms::href) {
    bool hrefIsSet =
      element->mStringAttributes[SVGFEImageElement::HREF].IsExplicitlySet() ||
      element->mStringAttributes[SVGFEImageElement::XLINK_HREF]
        .IsExplicitlySet();
    if (hrefIsSet) {
      element->LoadSVGImage(true, true);
    } else {
      element->CancelImageRequests(true);
    }
  }

  return nsFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
}
开发者ID:MichaelKohler,项目名称:gecko-dev,代码行数:27,代码来源:SVGFEImageFrame.cpp

示例4: switch

void JSSVGFEImageElement::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/)
{
    switch (token) {
    case XmllangAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        imp->setXmllang(value->toString(exec));
        break;
    }
    case XmlspaceAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        imp->setXmlspace(value->toString(exec));
        break;
    }
    }
}
开发者ID:FilipBE,项目名称:qtextended,代码行数:17,代码来源:JSSVGFEImageElement.cpp

示例5: throwError

JSValue* JSSVGFEImageElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
    if (!thisObj->inherits(&JSSVGFEImageElement::info))
      return throwError(exec, TypeError);

    JSSVGFEImageElement* castedThisObj = static_cast<JSSVGFEImageElement*>(thisObj);
    SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThisObj->impl());

    switch (id) {
    case JSSVGFEImageElement::GetPresentationAttributeFuncNum: {
        String name = args[0]->toString(exec);


        KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name)));
        return result;
    }
    }
    return 0;
}
开发者ID:Crawping,项目名称:davinci,代码行数:19,代码来源:JSSVGFEImageElement.cpp

示例6: switch

JSValue* JSSVGFEImageElement::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case HrefAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case XmllangAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        return jsString(imp->xmllang());
    }
    case XmlspaceAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        return jsString(imp->xmlspace());
    }
    case ExternalResourcesRequiredAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case XAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case YAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case WidthAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case HeightAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case ResultAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case ClassNameAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
        return toJS(exec, obj.get(), imp);
    }
    case StyleAttrNum: {
        SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(impl());

        return toJS(exec, WTF::getPtr(imp->style()));
    }
    }
    return 0;
}
开发者ID:Crawping,项目名称:davinci,代码行数:69,代码来源:JSSVGFEImageElement.cpp

示例7: xAttrGetter

static v8::Handle<v8::Value> xAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    SVGFEImageElement* imp = V8SVGFEImageElement::toNative(info.Holder());
    return toV8Fast(imp->xAnimated(), info, imp);
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:5,代码来源:V8SVGFEImageElement.cpp

示例8: xmlspaceAttrGetter

static v8::Handle<v8::Value> xmlspaceAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    SVGFEImageElement* imp = V8SVGFEImageElement::toNative(info.Holder());
    return v8String(imp->xmlspace(), info.GetIsolate());
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:5,代码来源:V8SVGFEImageElement.cpp

示例9: getPresentationAttributeCallback

static v8::Handle<v8::Value> getPresentationAttributeCallback(const v8::Arguments& args)
{
    SVGFEImageElement* imp = V8SVGFEImageElement::toNative(args.Holder());
    V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, name, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined));
    return toV8Fast(imp->getPresentationAttribute(name), args, imp);
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:6,代码来源:V8SVGFEImageElement.cpp


注:本文中的SVGFEImageElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。