Files
yoga/javascript/sources/Config.hh
vincentriemer c7f7ba250c Add Config::setPointScaleFactor to JavaScript binding
Summary:
Needed for a project I'm working on to properly render on high dpi screens. I've manually tested against my project to confirm it works.
Closes https://github.com/facebook/yoga/pull/612

Differential Revision: D6413517

Pulled By: emilsjolander

fbshipit-source-id: c298d7f6b58dc45aaaede2bb995df8615911a4a9
2017-11-27 04:59:53 -08:00

54 lines
983 B
C++

/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
#include <nbind/api.h>
#include <nbind/BindDefiner.h>
#include <yoga/Yoga.h>
class Config {
friend class Node;
public:
static Config * create(void);
static void destroy(Config * config);
private:
Config(void);
public:
~Config(void);
public: // Prevent accidental copy
Config(Config const &) = delete;
Config const & operator=(Config const &) = delete;
public: // Setters
void setExperimentalFeatureEnabled(int feature, bool enabled);
void setPointScaleFactor(float pixelsInPoint);
public: // Getters
bool isExperimentalFeatureEnabled(int feature) const;
private:
YGConfigRef m_config;
};